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 tsdb/chunkenc.Pool: Refactor Get and Put 2024-05-08 13:37:25 +02:00
bstream_test.go tsdb/chunkenc.Pool: Refactor Get and Put 2024-05-08 13:37:25 +02:00
chunk.go Fix: chunkenc.MockSeriesIterator 2024-08-30 16:44:36 +02:00
chunk_test.go tsdb/chunkenc.Pool: Refactor Get and Put 2024-05-08 13:37:25 +02:00
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 Fix lint error 2024-08-06 13:24:46 +02:00
histogram_meta_test.go [nhcb branch] Use single bit to differentiate between optimized bounds and floats (#13828) 2024-03-27 18:40:59 +01:00
histogram_test.go NH: Do not re-use spans between histograms (#14771) 2024-09-04 12:07:16 +02:00
varbit.go Fix language in docs and comments (#14041) 2024-05-08 17:57:09 +02:00
varbit_test.go
xor.go Fix a couple of comments 2024-07-05 15:25:42 +02:00
xor_test.go