Skip to content

fix(metrics): set the request schema when the backlog gauges ask the memories store - #5757

Merged
nicoloboschi merged 1 commit into
mainfrom
fix/backlog-gauge-schema
Oct 19, 2026
Merged

nicoloboschi merged 1 commit into
mainfrom
fix/backlog-gauge-schema

Conversation

@nicoloboschi

Copy link
Copy Markdown
Collaborator

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.py already 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.

…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.
@nicoloboschi
nicoloboschi merged commit 7c73b65 into main Oct 19, 2026
117 checks passed
@nicoloboschi
nicoloboschi deleted the fix/backlog-gauge-schema branch October 19, 2026 12:00
@nicoloboschi nicoloboschi mentioned this pull request Nov 3, 2026
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