00ab05c3b9
* chunkenc: allow missing empty buckets on histogram append Allow appending to chunks when the histogram to be added is missing some buckets, but the missing buckets are empty in the chunk. For example bucket at index 5 is present in the chunk, but its value is 0 and the new histogram doesn't have a bucket at index 5. This fixes an issue of merging chunks where one chunk was recoded to retroactively have some empty buckets in all the histograms and we are merging in a histogram that doesn't have the empty bucket (because it was not recoded yet). The operation alters the histogram that is being added, however this has already been the case when appending gauge histograms. Thus the test TestHistogramSeriesToChunks in storage package is changed to explicitly test what happened to the appended histogram - Compact(0) call is removed. The new expandIntSpansAndBuckets and expandFloatSpansAndBuckets functions are a merge of expandSpansForward and counterResetInAnyBucket and counterResetInAnyFloatBucket. Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com> |
||
---|---|---|
.. | ||
bstream.go | ||
bstream_test.go | ||
chunk.go | ||
chunk_test.go | ||
float_histogram.go | ||
float_histogram_test.go | ||
histogram.go | ||
histogram_meta.go | ||
histogram_meta_test.go | ||
histogram_test.go | ||
varbit.go | ||
varbit_test.go | ||
xor.go | ||
xor_test.go |