Repository navigation
fix(metrics): set the request schema when the backlog gauges ask the memories store - #5757
Merged
Merged
Conversation
…memories store A store-owned backend derives where a bank's memories live from the request schema. The consolidation backlog/failed gauge refresh looped every schema but never set it, so banks outside the default schema resolved against the default schema and dropped out of both gauges. Set it per schema, as the consolidation reconcile already does.
10 of 21 tasks
This was referenced Oct 20, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The consolidation backlog/failed gauge refresh (
_refresh_backlog) loops every tenant schema and asks the memories store for counts, but never sets the request schema. A store-owned backend derives where a bank's memories live from that schema, so every bank outside the default schema resolved against the default one: it was either left out of the gauge or made the whole schema's read fail (logged at debug). In a multi-tenant deployment that makes both gauges blind for nearly every bank.The fix sets the schema around the per-schema store calls, the same way the consolidation reconcile in
maintenance.pyalready does.Test:
test_refresh_backlog_counts_each_schema_under_its_own_schema— two schemas, each with one store-owned bank with a backlog; both are reported under their own schema. It fails without the fix.