Skip to content

Cancel stateless tasks before request teardown to correctly close their spans - #7137

Open
apeacock1991 wants to merge 1 commit into
mainfrom
apeacock/fix-request-teardown-order
Open

Cancel stateless tasks before request teardown to correctly close their spans#7137
apeacock1991 wants to merge 1 commit into
mainfrom
apeacock/fix-request-teardown-order

Conversation

@apeacock1991

Copy link
Copy Markdown
Contributor

Stateless context tasks can own trace spans that need the current IncomingRequest while they close. Cancel those tasks before recording the request outcome and removing the request.

Preserve abort reasons and undrained-task diagnostics while matching IoContext's task and timer destruction order.

@apeacock1991
apeacock1991 requested review from a team as code owners August 27, 2026 10:15
@apeacock1991
apeacock1991 force-pushed the apeacock/fix-request-teardown-order branch from 0a6bc2f to 063e463 Compare August 27, 2026 10:25
@ask-bonk

ask-bonk Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

@apeacock1991 Bonk workflow was cancelled.

View workflow run · To retry, trigger Bonk again.

Stateless context tasks can own trace spans that need the current
IncomingRequest while they close. Cancel those tasks before recording
the request outcome and removing the request.

Preserve abort reasons and undrained-task diagnostics. Match
IoContext's task and timer destruction order.
@apeacock1991
apeacock1991 force-pushed the apeacock/fix-request-teardown-order branch from 063e463 to a53692e Compare August 27, 2026 11:06
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