Skip to content

fix(mimir): gate StrongConsistency alert on strong mode - #16477

Open
shoemoney wants to merge 2 commits into
grafana:mainfrom
shoemoney:fix/mimir-alert-eventual
Open

fix(mimir): gate StrongConsistency alert on strong mode#16477
shoemoney wants to merge 2 commits into
grafana:mainfrom
shoemoney:fix/mimir-alert-eventual

Conversation

@shoemoney

@shoemoney shoemoney commented Aug 26, 2026

Copy link
Copy Markdown

Fixes MimirStrongConsistencyOffsetMissing firing on default eventual read consistency.

Bug: the alert at operations/mimir-mixin/alerts/ingest-storage.libsonnet computes the ratio of strong-consistency requests missing an offset against the total, but had no gate requiring strong-consistency traffic to exist. In default eventual mode, with no strong-consistency traffic at all, the ratio still evaluated and the alert could fire.

Fix: gate the expression on the total rate of cortex_ingest_storage_strong_consistency_requests_total{component="partition-reader"} being greater than zero, so the alert only evaluates when strong consistency is actually in use.

History: an earlier version of this fix gated on with_offset="true" traffic specifically. Cursor Bugbot correctly flagged that this suppressed the alert during a complete offset-propagation failure (all requests missing an offset), which is the exact case the alert exists to catch. The current version gates on total partition-reader strong-consistency rate instead, so it still fires when offsets are missing on all requests.

Tested with local alert evaluation (RED to GREEN). Single file change, no blast radius beyond ingest-storage.libsonnet.

Fix verified RED->GREEN. MimirStrongConsistencyOffsetMissing fires on default eventual read-consistency at ingest-storage.libsonnet:238
@shoemoney
shoemoney requested a review from a team as a code owner August 26, 2026 00:03
@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Signed commits report

2 of 2 commits between main and fix/mimir-alert-eventual could not be fully verified:

Commit Author Reason Message
18a9c981 Jeremy Schoemaker unsigned fix(mimir): gate StrongConsistency alert on strong mode
236f18b6 Jeremy Schoemaker unsigned fix(mimir): gate on total strong-consistency traffic, not offset-tagged requests

This repository requires all commits to be signed. See GitHub docs on commit signature verification.

@cla-assistant

cla-assistant Bot commented Aug 26, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Comment thread operations/mimir-mixin/alerts/ingest-storage.libsonnet Outdated
…ed requests

Bugbot: with_offset="true" gate suppressed the alert when offset injection
fails completely (all requests missing offsets), the exact case it should
catch. Gate on total partition-reader strong-consistency rate instead.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 236f18b. Configure here.

* 100 > 5
)
and
sum by (%(alert_aggregation_labels)s) (rate(cortex_ingest_storage_strong_consistency_requests_total{component="partition-reader"}[%(range)s])) > 0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Alert gate ignores strong consistency

Medium Severity

The and clause no longer requires with_offset="true" samples, so it matches any strong-consistency traffic. When only with_offset="false" requests exist, the ratio is 100% and the total rate is positive, so StrongConsistencyOffsetMissing still fires under default eventual consistency.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 236f18b. Configure here.

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.

1 participant