prometheus/tsdb/index
Bryan Boreham 2b4c652e10
Merge pull request #369 from grafana/shard-func
* tsdb: make sharding function a parameter

Instead of relying on `labels.Hash()`, which may change, have the
caller pass in a shard function if required.

For most purposes `tsdb.Options.ShardFunc` is used, but the compactor
may be created independently so `NewLeveledCompactorWithChunkSize` also
takes a shard function parameter.

Regular Prometheus, which does not use block sharding, will have this
parameter as nil.

Rename WithCache functions as WithOptions

Where they now have 2 or more extra parameters.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2023-01-26 11:59:03 +00:00
..
index.go Merge pull request #369 from grafana/shard-func 2023-01-26 11:59:03 +00:00
index_test.go Rename WithCache functions as WithOptions 2023-01-12 11:41:22 +00:00
postings.go Shortcut postings for matchers when empty postings are selected (#11813) 2023-01-10 15:21:49 +05:30
postings_test.go Merge remote-tracking branch 'upstream/main' into main 2023-01-08 14:55:44 +01:00
postingsstats.go Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00
postingsstats_test.go Format Go source files using 'gofumpt -w -s -extra' 2021-11-02 19:52:34 +01:00