Repository navigation
Conversation
The Lua scripts apply the withdrawal rules of `temporalio-streams`. A Local Activity write with its run's task facts withdraws the Records of the run's failed tasks, and a retry run's first write withdraws and fences the previous run. The Redis Store declares `RUN_FENCE`.
The writers of `temporalio-streams` keep their epoch and `sequence` order on the Redis Store too, standalone and on a cluster.
R2's withdrawal code now returns R1's Redis error type, in the moved store.rs.
# Conflicts: # crates/streams-redis/lua/append.lua
# Conflicts: # crates/streams-redis/src/store.rs
A create took any flag but 1 as unflagged, as the append did.
# Conflicts: # crates/streams-redis/src/store.rs
# Conflicts: # crates/streams-redis/docs/redis.md # crates/streams-redis/lua/append.lua # crates/streams-redis/lua/close.lua # crates/streams-redis/lua/create.lua # crates/streams-redis/src/store.rs # crates/streams-redis/tests/capabilities.rs
One string of all withdrawn tasks grew with each failed attempt, and every Local Activity append of the run parsed it. Behavior doesn't change.
Task keys compare as bytes, and temporalio-streams writes them in lowercase.
A batch can have two entries with s, a fenced run's resend and close keep their answers, and two kinds of late write stay visible in both Stores.
Both run commands that a plain create, append and close don't.
# Conflicts: # crates/streams-redis/docs/redis.md # crates/streams-redis/lua/append.lua # crates/streams-redis/src/store.rs
Only a newer epoch's item withdraws the held epoch's Records. So the Producer's next epoch still withdraws them, as in the memory Store.
A write from an older Core gives no task facts. Its task now goes in `oa` too, so that a later write's facts can withdraw its Records.
A task can fail before its call writes, so no orphan item withdrew it. `tf|<run>` keeps the facts of the run's highest task, and an append checks its task against them.
Maple's review shaped the types, the argument encoding and the tests of this PR. Co-authored-by: Maple Xu <45406854+xumaple@users.noreply.github.com>
Maple's review shaped the Store and the tests that this PR runs the writer suite on. Co-authored-by: Maple Xu <45406854+xumaple@users.noreply.github.com>
R1 follows the crate's new wire. R2's create keeps its withdrawal on the path that uses an existing Stream, after the conflict check, and its Local Activity task comes from the epoch's case.
R1 splits the storage reasons and closes with no Record. R2's close keeps its retry run fence, and a partial task key or short task facts are storage corrupt.
# Conflicts: # crates/streams-redis/lua/append.lua # crates/streams-redis/src/store.rs
A retry run's creates and appends withdraw the previous run, and Local Activities of three Workflow Tasks give random task facts. These rules are the longest part of the append script.
# Conflicts: # crates/streams-redis/tests/parity.rs
A batch gives its task facts and its run to withdraw in StreamWriter, and the orphan facts' StreamSuperseded has a writer. The create keeps its own withdraw_run.
The close keeps the closer and the status in the meta hash, and the read returns them, so the shared service builds the final item at the offset after the newest Record.
The Redis Store drops the owner check and the withdrawal and task-fact machinery, matching the sdk-core crate. The Producer field is 88 bytes, a read gives only Records and the final close item, and every open Stream keeps the safety_ttl after its last write.
moetemp
force-pushed
the
moe/brook/review/r3-writer-suite
branch
from
November 9, 2026 08:14
42585c3 to
0620162
Compare
Collaborator
Author
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.
This PR removes the owner and the withdrawal machinery from the Redis Store, to match the Stream crate.
The close is a read item with a Producer and a status, and the Store keeps no withdrawal facts. Supersession moves to an opt-in client helper.