Repository navigation
Wake receipt-ordered condition groups when timeout timers fire - #1386
Merged
Merged
Conversation
Member
Author
|
Independent review: PASS at head 41b2297
|
|
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.



Fixes #1377.
Root cause
In
Store::fire_due_timers, firing acondition_timeouttimer for a receipt-ordered condition wait (condition_wait_input_order = "durable_receipt_order") previously passedsuccessful = !evaluates_receipt_prefix(false) toStore::selection_resume. After #1383 (settlepolicy),selection_resumerunsall_groups_closedforfalseas well when any enclosing frame usessettle. Because a receipt-ordered condition wait remains open until the worker evaluates the receipt prefix and sendsresolve_condition_wait,all_groups_closedreturnedfalseand suppressed the wakeup, stranding the group.What changes
Store::coalesce_group_resumeand addStore::selection_resume_nowinrust/src/runtime/selections.rsto wake a parallel group immediately (still coalescing into an existing ready workflow task) without applying the group-closure barrier.Store::selection_resume_nowfromStore::fire_due_timersinrust/src/runtime/store.rswhenevaluates_receipt_prefixis true, andStore::selection_resume(..., true)otherwise.grouped_condition_waits::a_receipt_ordered_condition_group_wakes_when_its_timeout_timers_firecovering legacy,propagate, andsettleparallel condition groups end to end throughresolve_condition_waitandConditionWaitTimedOut.Verification
cargo test --test execution -- grouped_condition_waits parallel_group_policies occurrence_deadlines selections— 53 passed, 0 failed.