Repository navigation
Fixes #37889: Wait for the metrics worker's in-flight item before summarizing - #37890
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
… race test deterministic - Release the held worker only once the summary waits on the queue, so the regression test cannot pass without the fix. - Read thread ids under the lock in merge_all_threads. - Update the docstring and field comment that still called recording lock-free. - Add decision records for the 1s flush wait and the shared record/merge lock.
Code Review ✅ Approved 🟡 Medium risk 2 closed / 2 findingsSerializing metric writes with merges and waiting up to one second for in-flight queue work could delay summaries or omit metrics on timeout. Fixes the flaky ✅ 2 closed✅ Quality: Unrecorded decision: summary reads wait at most 1s for the metrics worker
✅ Quality: Unrecorded decision: recording and merging must share the metrics lock
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
…re summarizing (#37899) * Fixes #37889: Wait for the metrics worker's in-flight item before summarizing (#37890) * fix(ingestion): wait for the metrics worker's in-flight item before summarizing * fix(ingestion): record the metrics flush and lock decisions, make the race test deterministic - Release the held worker only once the summary waits on the queue, so the regression test cannot pass without the fix. - Read thread ids under the lock in merge_all_threads. - Update the docstring and field comment that still called recording lock-free. - Add decision records for the 1s flush wait and the shared record/merge lock. * docs: state when a metrics summary read can take the full flush wait (cherry picked from commit 930926a) * docs: the metrics flush ADR bounds only the wait, not the whole read
Fixes #37889
999 == 1000flake intest_high_concurrency_accuracy.test_summary_waits_for_the_item_the_worker_is_recording. It holds the worker mid-record, so it fails on main every time and passes with this change.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; the previous test-race finding is fixed.Summary
The PR makes summary reads wait for metrics the worker has already taken.
The previous test-race finding is fixed. No new actionable issues were found.
Diagram
Reviews (2) · Last reviewed commit: "docs: state when a metrics summary read ..." · Reviewed by Greptile