Address PR feedback: add comment explaining that we don't expect one case to happen often

This commit is contained in:
Charles Korn 2023-07-06 14:27:14 +10:00
parent 1299d98c46
commit f71a97b460
No known key found for this signature in database

View file

@ -687,6 +687,8 @@ func NewCompactingChunkSeriesMerger(mergeFunc VerticalSeriesMergeFunc) VerticalC
// duplicated
// - it does not check if overlapping chunks have samples that swap back and forth between
// different encodings over time, and so may underestimate the resulting number of chunks
// (we don't expect this to happen often though, as switching from float samples to histograms
// involves changing the instrumentation)
func estimateCompactedChunkCount(series []ChunkSeries) int {
h := make(chunkIteratorHeap, 0, len(series))