Source:
<code>private Deferred<Object> addPointInternal(final long timestamp, final byte[] value, final short flags) throws IllegalDataException { final boolean ms_timestamp = (timestamp & Const.SECOND_MASK) != 0; if (timestamp < 0 || (ms_timestamp && timestamp > 9999999999999L)) { throw new IllegalArgumentException((timestamp < 0 ? "negative " : "bad") + " timestamp=" + timestamp + " when trying to add value=" + Arrays.toString(value) + " to " + this); } <START> if ((ms_timestamp ? timestamp : timestamp * 1000) <= lastTimestamp) { <END> throw new IllegalArgumentException("New timestamp=" + timestamp + " is less than or equal to previous=" + lastTimestamp + " when trying to add value=" + Arrays.toString(value) + " to " + this); } lastTimestamp = (ms_timestamp ? timestamp : timestamp * 1000); long incomingBaseTime; if (ms_timestamp) { incomingBaseTime = ((timestamp / 1000) - ((timestamp / 1000) % Const.MAX_TIMESPAN)); } else { incomingBaseTime = (timestamp - (timestamp % Const.MAX_TIMESPAN)); } if (baseTime == Long.MIN_VALUE) { baseTime = incomingBaseTime; Bytes.setInt(rowKey, (int) baseTime, tsdb.metrics.width()); } if (incomingBaseTime - baseTime >= Const.MAX_TIMESPAN) { throw new IllegalDataException("The timestamp is beyond the boundary of this batch of data points"); } if (incomingBaseTime < baseTime) { throw new IllegalDataException("The timestamp is prior to the boundary of this batch of data points"); } final byte[] newQualifier = Internal.buildQualifier(timestamp, flags); append(newQualifier, value); size++; return Deferred.fromResult((Object) null); }</code><technical_language>worth allow out of order points fix write time? Folks complained this in bulk imports</technical_language>

Target:
private Deferred<Object> addPointInternal(final long timestamp, final byte[] value, final short flags) throws IllegalDataException { final boolean ms_timestamp = (timestamp & Const.SECOND_MASK) != 0; if (timestamp < 0 || (ms_timestamp && timestamp > 9999999999999L)) { throw new IllegalArgumentException((timestamp < 0 ? "negative " : "bad") + " timestamp=" + timestamp + " when trying to add value=" + Arrays.toString(value) + " to " + this); } if ((ms_timestamp ? timestamp : timestamp * 1000) <= last_timestamp) { throw new IllegalArgumentException("New timestamp=" + timestamp + " is less than or equal to previous=" + last_timestamp + " when trying to add value=" + Arrays.toString(value) + " to " + this); } last_timestamp = (ms_timestamp ? timestamp : timestamp * 1000); long incomingBaseTime; if (ms_timestamp) { incomingBaseTime = ((timestamp / 1000) - ((timestamp / 1000) % Const.MAX_TIMESPAN)); } else { incomingBaseTime = (timestamp - (timestamp % Const.MAX_TIMESPAN)); } if (base_time == Long.MIN_VALUE) { base_time = incomingBaseTime; Bytes.setInt(row_key, (int) base_time, tsdb.metrics.width()); } if (incomingBaseTime - base_time >= Const.MAX_TIMESPAN) { throw new IllegalDataException( "The timestamp is beyond the boundary of this batch of data points"); } if (incomingBaseTime < base_time) { throw new IllegalDataException( "The timestamp is prior to the boundary of this batch of data points"); } final byte[] new_qualifier = Internal.buildQualifier(timestamp, flags); append(new_qualifier, value); size++; return Deferred.fromResult((Object) null); }