Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

store: Binary index header is now production ready and enabled by default #2330

Merged
merged 2 commits into from
Mar 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Since there are no consistency guarantees provided by some Object Storage provid
- [#2294](https://github.com/thanos-io/thanos/pull/2294) store: optimizations for fetching postings. Queries using `=~".*"` matchers or negation matchers (`!=...` or `!~...`) benefit the most.
- [#2301](https://github.com/thanos-io/thanos/pull/2301) Ruler: initlialization fails with filepath bad pattern error and rule manager update error.
- [#2310](https://github.com/thanos-io/thanos/pull/2310) query: Report timespan 0 to 0 when discovering no stores.
- [#2330](https://github.com/thanos-io/thanos/pull/2330) store: index-header is no longer experimental. It is enabled by default for store Gateway. You can disable it with new hidden flag: `--store.disable-index-header`. `--experimental.enable-index-header` flag was removed.
GiedriusS marked this conversation as resolved.
Show resolved Hide resolved

## [v0.11.0](https://github.com/thanos-io/thanos/releases/tag/v0.11.0) - 2020.03.02

Expand Down
13 changes: 7 additions & 6 deletions cmd/thanos/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ func registerStore(m map[string]setupFunc, app *kingpin.Application) {

selectorRelabelConf := regSelectorRelabelFlags(cmd)

enableIndexHeader := cmd.Flag("experimental.enable-index-header", "If true, Store Gateway will recreate index-header instead of index-cache.json for each block. This will replace index-cache.json permanently once it will be out of experimental stage.").
// TODO(bwplotka): Remove in v0.13.0 if no issues.
disableIndexHeader := cmd.Flag("store.disable-index-header", "If specified, Store Gateway will use index-cache.json for each block instead of recreating binary index-header").
Hidden().Default("false").Bool()

enablePostingsCompression := cmd.Flag("experimental.enable-index-cache-postings-compression", "If true, Store Gateway will reencode and compress postings before storing them into cache. Compressed postings take about 10% of the original size.").
Expand Down Expand Up @@ -117,7 +118,7 @@ func registerStore(m map[string]setupFunc, app *kingpin.Application) {
uint64(*indexCacheSize),
uint64(*chunkPoolSize),
uint64(*maxSampleCount),
int(*maxConcurrent),
*maxConcurrent,
component.Store,
debugLogging,
*syncInterval,
Expand All @@ -128,7 +129,7 @@ func registerStore(m map[string]setupFunc, app *kingpin.Application) {
},
selectorRelabelConf,
*advertiseCompatibilityLabel,
*enableIndexHeader,
*disableIndexHeader,
*enablePostingsCompression,
time.Duration(*consistencyDelay),
time.Duration(*ignoreDeletionMarksDelay),
Expand Down Expand Up @@ -163,7 +164,7 @@ func runStore(
filterConf *store.FilterConfig,
selectorRelabelConf *extflag.PathOrContent,
advertiseCompatibilityLabel bool,
enableIndexHeader bool,
disableIndexHeader bool,
enablePostingsCompression bool,
consistencyDelay time.Duration,
ignoreDeletionMarksDelay time.Duration,
Expand Down Expand Up @@ -252,7 +253,7 @@ func runStore(
return errors.Wrap(err, "meta fetcher")
}

if enableIndexHeader {
if !disableIndexHeader {
level.Info(logger).Log("msg", "index-header instead of index-cache.json enabled")
}
bs, err := store.NewBucketStore(
Expand All @@ -269,7 +270,7 @@ func runStore(
blockSyncConcurrency,
filterConf,
advertiseCompatibilityLabel,
enableIndexHeader,
!disableIndexHeader,
enablePostingsCompression,
)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions test/e2e/e2ethanos/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ func NewStoreGW(sharedDir string, name string, bucketConfig client.BucketConfig,
store := NewService(
fmt.Sprintf("store-gw-%v", name),
DefaultImage(),
e2e.NewCommand("store", append(e2e.BuildArgs(map[string]string{
e2e.NewCommand("store", e2e.BuildArgs(map[string]string{
"--debug.name": fmt.Sprintf("store-gw-%v", name),
"--grpc-address": ":9091",
"--grpc-grace-period": "0s",
Expand All @@ -336,7 +336,7 @@ func NewStoreGW(sharedDir string, name string, bucketConfig client.BucketConfig,
"--store.grpc.series-max-concurrency": "1",
"--selector.relabel-config": string(relabelConfigBytes),
"--consistency-delay": "30m",
}), "--experimental.enable-index-header")...),
})...),
e2e.NewReadinessProbe(80, "/-/ready", 200),
80,
9091,
Expand Down