Repository navigation
fix(h3): preserve pooled request trace context - #410
Merged
Merged
Conversation
Contributor
CoverageTotal lines: 84.60% → 84.66% (+0.06 pp)
|
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.
Pooled HTTP/3 routes requests to a worker before the in-thread trace-context parser runs, leaving handler getters and access records without trace or span IDs. Prepare trace context, response compression and the JSON default through one shared helper in HTTP/1, HTTP/2, HTTP/3 and worker dispatch, using the dispatch thread's configuration. Preserve early H1/H2 parsing for WebSocket upgrades and avoid retaining valid trace headers twice.
Share the JSON-default response stub across parser/session unit tests and add an aborting stub for parser fuzz harnesses, which link the protocol helper without the response implementation.
Add a pooled HTTP/3 regression test that checks handler getters and access-log TraceId/SpanId for sampled and unsampled valid headers, uppercase and zero-ID headers, missing headers, and disabled telemetry.
Validation:
make -j4passes.The new test reproduces missing IDs on the previous module and passes after the fix, both with the reactor pool and with a temporary single-worker, pool-disabled variant.
Related HTTP/1 and HTTP/2 compression, HTTP/3 pool compression, JSON, trace-context and access-duration PHPT tests pass.
Rebuilt on current
mainand reran the regression and four related PHPT tests: all pass.All 22 cmocka/CTest targets pass. Both HTTP/1 and HTTP/2 fuzz harnesses build and complete 100 seeded smoke iterations under ASan/UBSan.
Fixes #352.