prometheus/tsdb/index
Giedrius Statkevičius 61b4080a14
tsdb/{index,compact}: allow using custom postings encoding format (#13242)
* tsdb/{index,compact}: allow using custom postings encoding format

We would like to experiment with a different postings encoding format in
Thanos so in this change I am proposing adding another argument to
`NewWriter` which would allow users to change the format if needed.
Also, wire the leveled compactor so that it would be possible to change
the format there too.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>

* tsdb/compact: use a struct for leveled compactor options

As discussed on Slack, let's use a struct for the options in leveled
compactor.

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>

* tsdb: make changes after Bryan's review

- Make changes less intrusive
- Turn the postings encoder type into a function
- Add NewWriterWithEncoder()

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>

---------

Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
2024-01-08 09:48:27 +00:00
..
index.go tsdb/{index,compact}: allow using custom postings encoding format (#13242) 2024-01-08 09:48:27 +00:00
index_test.go golangci-lint: enable testifylint linter (#13254) 2023-12-07 11:35:01 +00:00
postings.go postings: use Loser Tree for merge 2023-12-08 16:07:25 +00:00
postings_test.go tsdb/index: add benchmark for Postings.Merge 2023-12-08 16:00:22 +00:00
postingsstats.go Fix int32 overflow issues (#12978) 2023-10-16 16:23:26 +02:00
postingsstats_test.go golangci-lint: enable testifylint linter (#13254) 2023-12-07 11:35:01 +00:00