prometheus/tsdb/chunkenc
Justin Lei 8ef7dfdeeb
Add a chunk size limit in bytes (#12054)
Add a chunk size limit in bytes

This creates a hard cap for XOR chunks of 1024 bytes.

The limit for histogram chunk is also 1024 bytes, but it is a soft limit as a histogram has a dynamic size, and even a single one could be larger than 1024 bytes.

This also avoids cutting new histogram chunks if the existing chunk has fewer than 10 histograms yet. In that way, we are accepting "jumbo chunks" in order to have at least 10 histograms in a chunk, allowing compression to kick in.

Signed-off-by: Justin Lei <justin.lei@grafana.com>
2023-08-24 15:21:17 +02:00
..
bstream.go enable gocritic, unconvert and unused linters 2023-04-13 19:20:22 +00:00
bstream_test.go Testify: move to require (#8122) 2020-10-29 09:43:23 +00:00
chunk.go Add a chunk size limit in bytes (#12054) 2023-08-24 15:21:17 +02:00
chunk_test.go tsdb: Rework iterators (#9877) 2021-11-29 13:24:23 +05:30
float_histogram.go Hide histogram chunk append and reset header internals (#12352) 2023-07-26 15:08:16 +02:00
float_histogram_test.go Hide histogram chunk append and reset header internals (#12352) 2023-07-26 15:08:16 +02:00
histogram.go Hide histogram chunk append and reset header internals (#12352) 2023-07-26 15:08:16 +02:00
histogram_meta.go Fix HistogramAppender.Appendable array out of bound error 2023-05-14 17:38:52 +02:00
histogram_meta_test.go histograms: General readability tweaks 2023-01-19 13:26:42 +01:00
histogram_test.go Hide histogram chunk append and reset header internals (#12352) 2023-07-26 15:08:16 +02:00
varbit.go enable gocritic, unconvert and unused linters 2023-04-13 19:20:22 +00:00
varbit_test.go Use more varbit in histogram chunks 2021-10-13 20:03:35 +02:00
xor.go Hide histogram chunk append and reset header internals (#12352) 2023-07-26 15:08:16 +02:00
xor_test.go chunkenc: Slightly optimize xorWrite/xoRead (#11476) 2022-10-20 15:08:01 +05:30