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: introduce more postings strategies #5047

Conversation

dimitarvdimitrov
Copy link
Contributor

What this PR does

Trying to find a postings strategy which takes fewer risks but more risks than worst-case-small-posting-lists

Which issue(s) this PR fixes or relates to

Related to #4593

Checklist

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

Trying to find a postings strategy which takes fewer risks but more risks than `worst-case-small-posting-lists`

Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
@@ -452,6 +457,9 @@ func (cfg *BucketStoreConfig) Validate(logger log.Logger) error {
if !util.StringsContain(validSeriesSelectionStrategies, cfg.SeriesSelectionStrategyName) {
return errors.New("invalid series-selection-strategy, set one of " + strings.Join(validSeriesSelectionStrategies, ", "))
}
if cfg.SelectionStrategies.WorstCaseSeriesPreference <= 0 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

[nit] I would enforce it only when the strategy is "worst-case".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did it in a924c6d

Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
@dimitarvdimitrov dimitarvdimitrov enabled auto-merge (squash) May 23, 2023 11:09
@dimitarvdimitrov dimitarvdimitrov merged commit 308634e into main May 23, 2023
@dimitarvdimitrov dimitarvdimitrov deleted the dimitar/st-gw/make-worst-case-postings-strategy-configurable branch May 23, 2023 11:24
grafanabot pushed a commit that referenced this pull request May 23, 2023
Trying to find a postings strategy which takes fewer risks but more risks than `worst-case-small-posting-lists`

Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>

---------

Signed-off-by: Dimitar Dimitrov <dimitar.dimitrov@grafana.com>
(cherry picked from commit 308634e)
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