Skip to content

fix(db): attribute huddle_started_links pool acquisition (#7112 regression) - #7401

Open
rebekz wants to merge 1 commit into
block:mainfrom
kafi-labs:upstream-fix/db-attribute-huddle-query
Open

fix(db): attribute huddle_started_links pool acquisition (#7112 regression)#7401
rebekz wants to merge 1 commit into
block:mainfrom
kafi-labs:upstream-fix/db-attribute-huddle-query

Conversation

@rebekz

@rebekz rebekz commented Sep 6, 2026

Copy link
Copy Markdown

Problem

huddle_started_links (crates/buzz-db/src/store/event.rs) calls .fetch_all(pool) directly, bypassing the typed pool-acquisition attribution that the rest of the event store uses. This trips the repo's own guard:

observability_source::p0_pool_acquisitions_use_typed_operation_pairs_without_other

Introduced in c6ca9d9 ("Show status and huddle indicators beside names", #7112).

Why CI did not catch it

The guard commit 91ab9d31b predates #7112 by one day, so that PR's CI either did not run the guard or did not enforce its failure. Worth a look independently of this patch — the guard is currently not protecting main.

Fix

Acquire the connection through the existing WriterOperation::SubscriptionHistory label, matching the convention already used by the neighbouring query_events / count / get_last_message_at subscription-history reads in the same file, where replica routing does not select a reader.

SQL, binds, returned rows, ordering, and propagated errors are unchanged — this is attribution only.

Verification

  • Guard observed failing on the unmodified line, then passing after the change (both directions observed, so the check discriminates).
  • cargo clippy --workspace --all-targets -- -D warnings clean.

🤖 Generated with Claude Code

Repair upstream regression c6ca9d9 by acquiring the event-store writer pool under the existing SubscriptionHistory operation label.

Signed-off-by: Fitra Kacamarga <fitra.19@gmail.com>
@rebekz
rebekz requested a review from a team as a code owner September 6, 2026 01:15
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is 3c7f288c60d67df78577b237e27c3dfc8831aaa1...db8072181f3ff0e94eed20a6ebfef198b16e6933.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review db8072181f3ff0e94eed20a6ebfef198b16e6933 to authorize a new review.
Any previous review applies only to its recorded range.

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