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-gateway: disable index header verification #5174

Merged

Conversation

dimitarvdimitrov
Copy link
Contributor

What this PR does

This PR disables verifying the index header upon loading it. Reading the whole index header can be resource consuming. Verification/checksumming reads the whole index header once in addition to the read to sample the index header. This change should effectively halve the time to load an index header since one of the reads will be skipped.

@pracucci suggested to make this configurable per-tenant. But the changes would involve changing 23 tests and 3 more production code usages. I'm not sure if the complexity is worth it at this point. I can extend the PR if reviewers think per-tenant configuration is necessary. IMO this configuration parameter depends on the hardware on which the store-gateway runs and the risk for all tenants is the same.

Which issue(s) this PR fixes or relates to

Related to #5046

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

This PR disables verifying the index header upon loading it. Reading the whole index header
can be resource consuming. Verificaiton/checksumming reads the whole index header once in addition to the read
to sample the index header. This change should effectively halve the time to load an index header since one of the
reads will be skipped.

pracucci suggested to make this configurable per-tenant. But the changes would involve changing 23 tests and
3 more production code usages. I'm not sure if the complexity is worth it at this point. I can extend the PR if
reviewers think this change is incomplete.

Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
CHANGELOG.md Show resolved Hide resolved
Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (I just left minor comments)

pkg/storegateway/indexheader/header.go Outdated Show resolved Hide resolved
pkg/storegateway/indexheader/index/symbols.go Outdated Show resolved Hide resolved
pkg/storegateway/indexheader/index/postings.go Outdated Show resolved Hide resolved
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
Copy link
Collaborator

@pracucci pracucci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing my feedback. LGTM!

@dimitarvdimitrov dimitarvdimitrov enabled auto-merge (squash) June 6, 2023 13:58
@dimitarvdimitrov dimitarvdimitrov merged commit ae653d6 into main Jun 6, 2023
@dimitarvdimitrov dimitarvdimitrov deleted the dimitar/st-gw/disable-index-header-verification-on-load branch June 6, 2023 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants