Repository navigation
Conversation
Owner
Author
|
Closing as stale. This layer is folded into the v5 tip, #41, and the upstream review uses a fresh series instead. Plan: https://www.notion.so/4048fc567738814990b7c796ac28fe3f |
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.
What changed?
This PR withdraws a run's Local Activity Records of Workflow Tasks that never completed (S110).
A Local Activity batch that gives
previous_completed_task(the run's last completed task, 0 before the first) andfailed_tasksnow applies the orphan rule in the same append script. Its dispatching task is in its epoch. The Store keeps the run's open Local Activity task keys per Stream (oa|<run>). It withdraws those after the completed task and before the batch's task, the failed ones, and the lower attempts, and drops the tasks at or before the completed one. The withdrawal is ones-only entry with a Workflow-kindSupersession(the run's Workflow Producer, the batch's task, the completed and failed tasks), so the existingwithdraws()reader rule removes exactly those Records. The withdrawn tasks stay inow|<run>, which fences a late write of such a task. A batch with no completed task skips the rule, so an older lang behaves as before. The rerun-by-epoch rule is unchanged. The memory Store does the same, and the Redis docs describe the rule.Why?
Decision S110. A Local Activity writes in task 3, task 3 fails, and the retry never runs that call again, so no newer epoch supersedes it. Before, its Records stayed visible.
How did you test it?
cargo fmt --all -- --check,cargo clippy --workspace --tests -- -D warnings(also with--no-default-features --features tls-aws-lc), andSTREAMS_REQUIRE=redis cargo test --workspaceon standalone Redis, cluster Redis and memory. New service tests: a task 3 Local Activity orphaned by task 4's write on another path, a late write of it fenced, and a later write that withdraws nothing more. Also a failed task before the last completed one, withdrawn by its id. The rerun test still passes.The main missing element is the Core field for the last completed task in
ActivityTask.Startfield 20, which waits for the lead's go-ahead.