Skip to content

fix: serialize native business retries and pace physical contention - #380

Merged
ovasylenko merged 1 commit into
mainfrom
fix/physical-business-retry-ownership
Oct 29, 2026
Merged

ovasylenko merged 1 commit into
mainfrom
fix/physical-business-retry-ownership

Conversation

@ovasylenko

Copy link
Copy Markdown
Contributor

Business retries receive a fresh task UUID. A second engine could therefore enter the same workflow instance/block while the predecessor callback was still physically running, bypassing task-ID-only exclusion.

Atomically reserve both canonical backend/task identity and backend/instance/block identity. Retain both through callback and foreign destructor completion; claim generations, worker identity changes and fresh business-retry UUIDs cannot overlap. Different instances, blocks and backends remain independent.

Physical contention previously caused 167 poll/release cycles in 200ms in the regression. Pace subsequent polls using the worker idle cadence, clamped to 1–30 seconds. Already delivered independent work stays admissible, graceful draining is unchanged, and the pending retry resumes after physical return.

Validation:

  • Reproduced real callback overlap on the isolated parent before the fix.
  • Reproduced the hot poll/release loop after adding invocation exclusion, then verified bounded polling and eventual recovery.
  • All 723 mobile tests, strict all-target workspace Clippy, actual WASM compilation and formatting passed on the isolated final sources.
  • Cases cover canonical aliases, full-width epochs, identity mismatches, independent scopes, clone ownership, engine teardown and blocked foreign destruction.

@ovasylenko
ovasylenko merged commit bcd5a81 into main Oct 29, 2026
25 checks passed
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