prometheus/tsdb/chunkenc
Joshua Hesketh f2064c7987
NH: Do not re-use spans between histograms (#14771)
promql, tsdb (histograms): Do not re-use spans between histograms

When multiple points exist with the same native histogram schemas they
share their spans.
This causes a problem when a native histogram (NH) schema is modified (for example, during
a Sum) then the other NH's with the same spans are also modified. As such,
we should create a new Span for each NH. This will ensure NH's interfaces
are safe to use without considering the effect on other histograms.

At the moment this doesn't present itself as a problem because in all
aggregations and functions operating on native histograms they are copied
by the promql query engine first.

Signed-off-by: Joshua Hesketh <josh@nitrotech.org>

---------

Signed-off-by: Joshua Hesketh <josh@nitrotech.org>
2024-09-04 12:07:16 +02:00
..
bstream.go
bstream_test.go
chunk.go
chunk_test.go
float_histogram.go NH: Do not re-use spans between histograms (#14771) 2024-09-04 12:07:16 +02:00
float_histogram_test.go NH: Do not re-use spans between histograms (#14771) 2024-09-04 12:07:16 +02:00
histogram.go NH: Do not re-use spans between histograms (#14771) 2024-09-04 12:07:16 +02:00
histogram_meta.go
histogram_meta_test.go
histogram_test.go NH: Do not re-use spans between histograms (#14771) 2024-09-04 12:07:16 +02:00
varbit.go
varbit_test.go
xor.go
xor_test.go