Skip to content

Move suspension into operation guard - #99053

Merged
jimmyhmiller merged 2 commits into
canaryfrom
jimmym/suspend-on-operation-guard
Sep 23, 2026
Merged

jimmyhmiller merged 2 commits into
canaryfrom
jimmym/suspend-on-operation-guard

Conversation

@jimmyhmiller

Copy link
Copy Markdown
Contributor

So in some testing I found a rare error where a child task could take the suspend point, causing it to decrement the counter even though it hadn't incremented it. Move this operation to the guard makes this not impossible (you can still just grab the coordinator) but at least in this code path makes it unlikely you do this. It fixes the bug I found. Discussed this with Luke. We agreed trying to recreate the case in a unit test would probably be a bit overkill.

@jimmyhmiller
jimmyhmiller requested review from a team and lukesandberg September 22, 2026 14:40
@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: ed869eb

Comment thread turbopack/crates/turbo-tasks-backend/src/backend/operation/mod.rs Outdated
@jimmyhmiller
jimmyhmiller force-pushed the jimmym/suspend-on-operation-guard branch from e39d3b2 to 4c7e70b Compare September 23, 2026 14:49
Require an active operation guard before decrementing the snapshot coordinator count.
@jimmyhmiller
jimmyhmiller force-pushed the jimmym/suspend-on-operation-guard branch from 4c7e70b to ed869eb Compare September 23, 2026 16:23
@jimmyhmiller
jimmyhmiller merged commit 82dd6d6 into canary Sep 23, 2026
101 checks passed
@jimmyhmiller
jimmyhmiller deleted the jimmym/suspend-on-operation-guard branch September 23, 2026 19:13
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.

2 participants