perf(daemon): run trace normalization on blocking workers - #2031
Open
svarlamov wants to merge 1 commit into
Open
perf(daemon): run trace normalization on blocking workers#2031svarlamov wants to merge 1 commit into
svarlamov wants to merge 1 commit into
Conversation
This was referenced Jul 29, 2026
Member
Author
svarlamov
force-pushed
the
fix/trace-normalization-off-ingest-task
branch
2 times, most recently
from
August 2, 2026 22:00
2c0767f to
b6f777e
Compare
svarlamov
force-pushed
the
fix/per-family-trace-fences
branch
from
August 2, 2026 22:00
4888713 to
52c908e
Compare
Trace normalization can synchronously read repository and Git configuration state, while orphan sweeps inspect repository state. Running that work inline on the trace-ingest future can block a Tokio runtime worker needed by control, listener, and family tasks. Run both operations with spawn_blocking_result. The ingest worker still awaits each result to preserve exact payload ordering, while the runtime worker remains available for async work. Move the owned trace payload into the blocking closure so offloading adds no payload clone on the critical path. Protect the shared normalizer with a standard mutex and recover poisoned guards, preserving the ingest worker panic-recovery behavior. Re-lands the ingest-offload portion of #1981 on the current architecture; the family/global side-effect offload already landed via #1996/#2019. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
svarlamov
force-pushed
the
fix/trace-normalization-off-ingest-task
branch
from
August 2, 2026 22:18
b6f777e to
6e9177d
Compare
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.

Summary
spawn_blocking_result.TDD / review validation
TestReporegression using a one-worker test daemon and a FIFO-backed repository config. While the real normalizer is blocked on a cold alias-config read,status.familymust remain responsive; after release, a subsequent trace must normalize and complete.TestRepocross-family synchronization regression in perf(daemon): scope sync.family's trace fence to the requested family #2030 and all 24 trace-normalizer tests pass on the stack tip.task test(2155library tests,77daemon-mode tests,3264integration tests, and remaining test binaries/doc tests),task lint,task fmt, andgit diff --checkare green locally.The test-only worker-count override is read once when constructing a
test-supportdaemon runtime; it adds no production or ingestion-path work.This re-lands the ingest-offload portion of #1981 on the current architecture; actor side-effect offloading already landed through #1996/#2019.
Depends on #2030.