lib/storage: skip recovering timestamps order for lossless compression (PrecisionBits=64)

This commit is contained in:
Aliaksandr Valialkin 2020-01-17 23:44:31 +02:00
parent 2084921e64
commit a851c75703

View File

@ -244,7 +244,10 @@ func (b *Block) UnmarshalData() error {
if err != nil {
return err
}
if b.bh.PrecisionBits < 64 {
// Recover timestamps order after lossy compression.
encoding.EnsureNonDecreasingSequence(b.timestamps, b.bh.MinTimestamp, b.bh.MaxTimestamp)
}
b.timestampsData = b.timestampsData[:0]
b.values, err = encoding.UnmarshalValues(b.values[:0], b.valuesData, b.bh.ValuesMarshalType, b.bh.FirstValue, int(b.bh.RowsCount))