prometheus/storage
Fiona Liao 5bee0cfce2
Change `ChunkReader.Chunk()` to `ChunkOrIterable()`
The ChunkReader interface's Chunk() has been changed to ChunkOrIterable(). 

This is a precursor to OOO native histogram support - with OOO native histograms, the chunks.Meta passed to Chunk() can result in multiple chunks being returned rather than just a single chunk (e.g. if oooMergedChunk has a counter reset in the middle). 

To support this, ChunkOrIterable() requires either a single chunk or an iterable to be returned. If an iterable is returned, the caller has the responsibility of converting the samples from the iterable into possibly multiple chunks. The OOOHeadChunkReader now returns an iterable rather than a chunk to prepare for the native histograms case. Also as a beneficial side effect, oooMergedChunk and boundedChunk has been simplified as they only need to implement the Iterable interface now, not the full Chunk interface.

---------

Signed-off-by: Fiona Liao <fiona.y.liao@gmail.com>
Co-authored-by: George Krajcsovits <krajorama@users.noreply.github.com>
2023-11-28 11:14:29 +01:00
..
remote Add suffixes 2023-11-15 15:52:18 +01:00
buffer.go storage: Fix mixed samples handling in sampleRing 2023-10-31 16:18:09 +01:00
buffer_test.go Merge pull request #13057 from prometheus/release-2.48 2023-10-31 15:24:39 -04:00
fanout.go Add context argument to Querier.Select (#12660) 2023-09-12 12:37:38 +02:00
fanout_test.go use Go standard errors package 2023-11-03 07:26:31 +00:00
generic.go Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00
interface.go Move histogram validation code to model/histogram 2023-11-03 16:17:24 +02:00
lazy.go Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00
memoized_iterator.go Make MemoizedSeriesIterator not implement chunkenc.Iterator 2023-05-03 12:45:39 -07:00
memoized_iterator_test.go ci(lint): enable nolintlint and remove redundant comments (#12926) 2023-10-31 12:35:13 +01:00
merge.go Change `ChunkReader.Chunk()` to `ChunkOrIterable()` 2023-11-28 11:14:29 +01:00
merge_test.go Fix issue where `concatenatingChunkIterator` can obscure errors. 2023-11-02 15:29:09 +11:00
noop.go Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00
secondary.go Add warnings (and annotations) to PromQL query results (#12152) 2023-09-14 18:57:31 +02:00
series.go Add a chunk size limit in bytes (#12054) 2023-08-24 15:21:17 +02:00
series_test.go storage: make histogram reset handling consistent in chainSampleIterator (#12779) 2023-09-19 17:06:46 +02:00