Skip to content

Add config flag to enable delayed name removal for fallback Prometheus engine#14349

Open
zenador wants to merge 3 commits intomainfrom
zenador/add-dnr-flag-prom
Open

Add config flag to enable delayed name removal for fallback Prometheus engine#14349
zenador wants to merge 3 commits intomainfrom
zenador/add-dnr-flag-prom

Conversation

@zenador
Copy link
Contributor

@zenador zenador commented Feb 12, 2026

What this PR does

See title

Which issue(s) this PR fixes or relates to

Follow up to #13926 where we removed the ability to configure delayed name removal for Prometheus engine within Mimir

Checklist

  • Tests updated.
  • Documentation added.
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]. If changelog entry is not needed, please add the changelog-not-needed label to the PR.
  • about-versioning.md updated with experimental features.

Not sure if we need a changelog as this is more for internal use?


Note

Low Risk
Small, opt-in config change affecting only the fallback Prometheus query engine path; default remains unchanged, but enabling it could subtly alter query behavior.

Overview
Adds a new experimental querier config/CLI flag, -querier.enable-delayed-name-removal-fallback-engine, to control Prometheus delayed name removal when the system falls back from MQE to the Prometheus engine.

Wires the flag through pkg/querier/engine/config.go so promql.EngineOpts.EnableDelayedNameRemoval is driven by config (instead of always disabled), and documents the option in the generated config descriptor, help text, docs, and the changelog.

Written by Cursor Bugbot for commit 1923374. This will update automatically on new commits. Configure here.

@zenador zenador requested review from a team and tacole02 as code owners February 12, 2026 21:09
@github-actions
Copy link
Contributor

github-actions bot commented Feb 12, 2026

💻 Deploy preview available (Add config flag to enable delayed name removal for fallback Prometheus engine):

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 with Just naming suggestions.

Copy link
Contributor

@tacole02 tacole02 left a comment

Choose a reason for hiding this comment

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

Docs look good! Thank you!

zenador and others added 2 commits February 16, 2026 11:31
Co-authored-by: Nick Pillitteri <56quarters@users.noreply.github.com>
f.IntVar(&cfg.MaxSamples, "querier.max-samples", 50e6, sharedWithQueryFrontend("Maximum number of samples a single query can load into memory."))
f.DurationVar(&cfg.DefaultEvaluationInterval, "querier.default-evaluation-interval", time.Minute, sharedWithQueryFrontend("The default evaluation interval or step size for subqueries."))
f.DurationVar(&cfg.LookbackDelta, "querier.lookback-delta", 5*time.Minute, sharedWithQueryFrontend("Time since the last sample after which a time series is considered stale and ignored by expression evaluations."))
f.BoolVar(&cfg.EnableDelayedNameRemovalFallbackEngine, "querier.enable-delayed-name-removal-fallback-engine", false, "Enable the experimental Prometheus feature for delayed name removal in the fallback Prometheus engine. Note that this only applies when the Mimir Query Engine is enabled along with fallback to the Prometheus engine.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Doesn't this apply regardless of whether or not MQE is enabled? eg. if -querier.query-engine=prometheus, this flag still applies.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we just do f.BoolVar(&cfg.EnableDelayedNameRemovalPrometheusEngine, "querier.enable-delayed-name-removal-prometheus-engine", false, "Enable the experimental Prometheus feature for delayed name removal in the Prometheus engine. Note that this only applies when the Prometheus engine is selected or used as fallback from the Mimir Query Engine.") then?

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.

4 participants

Comments