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

Remove deprecated configurations #6673

Merged
merged 5 commits into from
Nov 17, 2023
Merged

Remove deprecated configurations #6673

merged 5 commits into from
Nov 17, 2023

Conversation

leizor
Copy link
Contributor

@leizor leizor commented Nov 15, 2023

What this PR does

In preparation for release 2.11, this PR performs the scheduled removals of the following deprecated configuration parameters:

  • -querier.query-ingesters-within
  • -querier.iterators
  • -querier.batch-iterators
  • -blocks-storage.bucket-store.max-chunk-pool-bytes
  • -blocks-storage.bucket-store.chunk-pool-min-bucket-size-bytes
  • -blocks-storage.bucket-store.chunk-pool-max-bucket-size-bytes
  • -blocks-storage.bucket-store.bucket-index.enabled

I've separated each deprecation removal into its own commit so it might be easiest to review this PR one commit at a time.

Which issue(s) this PR fixes or relates to

#6670

Checklist

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

@leizor leizor force-pushed the leizor/prep-release-2.11 branch 6 times, most recently from 9159a1f to abb0dac Compare November 15, 2023 22:05
The `-querier.query-ingesters-within` config has been moved from a
global config to a per-tenant limit config.

See #4287 for more details.
The `-querier.iterators` and `-querier.batch-iterators` configuration
parameters have been removed.

See #5114 for more details.
@leizor leizor changed the title Prep for release 2.11 Remove deprecated configurations Nov 15, 2023
The following deprecated flags are removed:
  - `-blocks-storage.bucket-store.max-chunk-pool-bytes`
  - `-blocks-storage.bucket-store.chunk-pool-min-bucket-size-bytes`
  - `-blocks-storage.bucket-store.chunk-pool-max-bucket-size-bytes`

See #4996 for more details.
@leizor leizor force-pushed the leizor/prep-release-2.11 branch 3 times, most recently from 7592ea0 to 5e5a68c Compare November 16, 2023 17:41
This configuration parameter has been removed. Mimir is running with
bucket index enabled by default since 2.0 and it is now not possible to
disable it.

See #5051 for more details.
@leizor leizor marked this pull request as ready for review November 16, 2023 19:56
@leizor leizor requested review from a team as code owners November 16, 2023 19:56
@@ -4,6 +4,14 @@

### Grafana Mimir

* [CHANGE] The following deprecated configurations have been removed: #6673
* `-querier.query-ingesters-within`
Copy link
Contributor

Choose a reason for hiding this comment

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

We probably aslo need to update runbook https://github.com/grafana/mimir/blob/main/docs/sources/mimir/manage/mimir-runbooks/_index.md. -querier.query-ingesters-within is still mentioned.

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 think the flag still exists, but it's now a tenant-level override

Copy link
Contributor

@56quarters 56quarters left a comment

Choose a reason for hiding this comment

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

LGTM

@leizor leizor merged commit da7527d into main Nov 17, 2023
30 checks passed
@leizor leizor deleted the leizor/prep-release-2.11 branch November 17, 2023 22:39
krajorama added a commit that referenced this pull request Nov 21, 2023
Followup to #6673

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
@krajorama krajorama mentioned this pull request Nov 21, 2023
1 task
krajorama added a commit that referenced this pull request Nov 21, 2023
Followup to #6673

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
Comment on lines -212 to -232
var finder BlocksFinder
if storageCfg.BucketStore.BucketIndex.DeprecatedEnabled {
finder = NewBucketIndexBlocksFinder(BucketIndexBlocksFinderConfig{
IndexLoader: bucketindex.LoaderConfig{
CheckInterval: time.Minute,
UpdateOnStaleInterval: storageCfg.BucketStore.SyncInterval,
UpdateOnErrorInterval: storageCfg.BucketStore.BucketIndex.UpdateOnErrorInterval,
IdleTimeout: storageCfg.BucketStore.BucketIndex.IdleTimeout,
},
MaxStalePeriod: storageCfg.BucketStore.BucketIndex.MaxStalePeriod,
IgnoreDeletionMarksDelay: storageCfg.BucketStore.IgnoreDeletionMarksDelay,
}, bucketClient, limits, logger, reg)
} else {
finder = NewBucketScanBlocksFinder(BucketScanBlocksFinderConfig{
ScanInterval: storageCfg.BucketStore.SyncInterval,
TenantsConcurrency: storageCfg.BucketStore.TenantSyncConcurrency,
MetasConcurrency: storageCfg.BucketStore.MetaSyncConcurrency,
CacheDir: storageCfg.BucketStore.SyncDir,
IgnoreDeletionMarksDelay: storageCfg.BucketStore.IgnoreDeletionMarksDelay,
}, bucketClient, limits, logger, reg)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

the default should be that the index is always used, not that it's never used

leizor added a commit that referenced this pull request Nov 30, 2023
The use of BucketScanBlocksFinder was supposed to be removed in
#6673 but its counterpart
BucketIndexBlocksFinder was accidentally removed instead.

This reverses that.
leizor added a commit that referenced this pull request Nov 30, 2023
* Use BucketIndexBlocksFinder instead of BucketScanBlocksFinder

The use of BucketScanBlocksFinder was supposed to be removed in
#6673 but its counterpart
BucketIndexBlocksFinder was accidentally removed instead.

This reverses that.

* Remove BlocksFinderBucketScan

* Update docs wrt. bucket scanning option

* Remove alert and runbook for bucket scanning
grafanabot pushed a commit that referenced this pull request Dec 1, 2023
* Use BucketIndexBlocksFinder instead of BucketScanBlocksFinder

The use of BucketScanBlocksFinder was supposed to be removed in
#6673 but its counterpart
BucketIndexBlocksFinder was accidentally removed instead.

This reverses that.

* Remove BlocksFinderBucketScan

* Update docs wrt. bucket scanning option

* Remove alert and runbook for bucket scanning

(cherry picked from commit ff8a70a)
dimitarvdimitrov pushed a commit that referenced this pull request Dec 1, 2023
…6790)

* Use BucketIndexBlocksFinder instead of BucketScanBlocksFinder

The use of BucketScanBlocksFinder was supposed to be removed in
#6673 but its counterpart
BucketIndexBlocksFinder was accidentally removed instead.

This reverses that.

* Remove BlocksFinderBucketScan

* Update docs wrt. bucket scanning option

* Remove alert and runbook for bucket scanning

(cherry picked from commit ff8a70a)

Co-authored-by: Justin Lei <lei.justin@gmail.com>
Comment on lines -451 to -473
var fetcher block.MetadataFetcher
if u.cfg.BucketStore.BucketIndex.DeprecatedEnabled {
fetcher = NewBucketIndexMetadataFetcher(
userID,
u.bucket,
u.limits,
u.logger,
fetcherReg,
filters,
)
} else {
var err error
fetcher, err = block.NewMetaFetcher(
userLogger,
u.cfg.BucketStore.MetaSyncConcurrency,
userBkt,
u.syncDirForUser(userID), // The fetcher stores cached metas in the "meta-syncer/" sub directory
fetcherReg,
filters,
)
if err != nil {
return nil, err
}
Copy link
Contributor

Choose a reason for hiding this comment

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

opened #6808 to make the bucket index the default

Comment on lines +190 to +191
// Wait until the querier has discovered the uploaded blocks.
require.NoError(t, querier.WaitSumMetrics(e2e.Equals(2), "cortex_blocks_meta_synced"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did we keep this, which was running when bucket index was disabled?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Fixed by #6779

Comment on lines +442 to +444
// Wait until the querier has discovered the uploaded blocks (discovered both by the querier and store-gateway).
require.NoError(t, cluster.WaitSumMetricsWithOptions(e2e.Equals(float64(2*cluster.NumInstances()*2)), []string{"cortex_blocks_meta_synced"}, e2e.WithLabelMatchers(
labels.MustNewMatcher(labels.MatchEqual, "component", "querier"))))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same here

Copy link
Collaborator

Choose a reason for hiding this comment

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

Fixed by #6779

@@ -209,27 +209,13 @@ func NewBlocksStoreQueryableFromConfig(querierCfg Config, gatewayCfg storegatewa
bucketClient = cachingBucket

// Create the blocks finder.
var finder BlocksFinder
if storageCfg.BucketStore.BucketIndex.DeprecatedEnabled {
finder = NewBucketIndexBlocksFinder(BucketIndexBlocksFinderConfig{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Wrong removal, fixed by #6779

queryMetrics := stats.NewQueryMetrics(reg)

distributorQueryable := newDistributorQueryable(distributor, iteratorFunc, limits, queryMetrics, logger)
distributorQueryable := newDistributorQueryable(distributor, mergeChunks, limits, queryMetrics, logger)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why mergeChunks? The default was -querier.batch-iterators=true which means batch.NewChunkMergeIterator was in use.

Copy link
Contributor

Choose a reason for hiding this comment

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

changed in #6814

@@ -448,29 +448,20 @@ func (u *BucketStores) getOrCreateStore(userID string) (*BucketStore, error) {
}

// Instantiate a different blocks metadata fetcher based on whether bucket index is enabled or not.
var fetcher block.MetadataFetcher
if u.cfg.BucketStore.BucketIndex.DeprecatedEnabled {
fetcher = NewBucketIndexMetadataFetcher(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Fixed by #6808


var cfg Config
flagext.DefaultValues(&cfg)
cfg.BatchIterators = true // Always use the Batch iterator - regression test
Copy link
Contributor

Choose a reason for hiding this comment

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

given this was testing with batch iterators, then should we also keep that test (assuming that batch iterators are always on from now on)?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we want to restore it. It was introduced earlier this year: #4376

Copy link
Contributor

Choose a reason for hiding this comment

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

restored in #6814

Copy link
Contributor

@dimitarvdimitrov dimitarvdimitrov left a comment

Choose a reason for hiding this comment

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

I realized this PR doesn't update about-versioning.md which mentions these config options as deprecated. Can you update it @leizor ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants