Repository navigation
Conversation
moetemp
force-pushed
the
moe/brook/review/streams-k7-withdrawals
branch
from
October 27, 2026 07:35
d21bc6e to
e12bbce
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k9-writers
branch
2 times, most recently
from
October 27, 2026 08:17
26765fa to
d18c6dc
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k7-withdrawals
branch
from
October 27, 2026 08:17
e12bbce to
855fbbc
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k7-withdrawals
branch
from
October 27, 2026 16:55
855fbbc to
1228850
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k9-writers
branch
2 times, most recently
from
October 27, 2026 23:46
018e21d to
be4d7ae
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k7-withdrawals
branch
from
October 27, 2026 23:46
1228850 to
8601859
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k9-writers
branch
from
October 28, 2026 08:55
be4d7ae to
95ed97c
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k7-withdrawals
branch
2 times, most recently
from
October 29, 2026 04:06
70da9b2 to
7363e49
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k9-writers
branch
from
October 29, 2026 04:06
95ed97c to
0922872
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k7-withdrawals
branch
from
October 29, 2026 08:37
7363e49 to
eb4a41f
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k9-writers
branch
from
October 29, 2026 08:37
0922872 to
b163ba2
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k7-withdrawals
branch
from
October 29, 2026 09:17
eb4a41f to
9416b54
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k9-writers
branch
from
October 29, 2026 09:17
b163ba2 to
83b33d1
Compare
A writer keeps one Producer epoch and one `sequence` order, so a retry after a Store failure writes a batch only once. The handles of one Producer epoch on one Stream share one writer. The writer suite runs on every Store.
moetemp
force-pushed
the
moe/brook/review/streams-k7-withdrawals
branch
from
October 29, 2026 10:03
9416b54 to
64c31e5
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k9-writers
branch
from
October 29, 2026 10:03
83b33d1 to
56fd065
Compare
The flaky test Store drops default_retention, which K3 removed from the Store trait.
The Store now refuses an append of more than 1000 Records, so a larger max_batch_size would fail every full batch.
The case also gives an Activity's attempt, so the rule reads one field. The writer suite builds its Producers and creates from the new shapes.
Corrupt Store data reads the same on a retry, so the write fails at once and the writer fails. The writer suite checks it on a Store that refuses one append as corrupt.
An open carries its StreamRef in ref, and the writer keeps it as stream_ref.
OpenWriterRequest carries the Producer and the task facts in one StreamWriter, and each batch sends it as AppendRecords does.
Only a retry run's first append withdraws a run, and a writer sends many batches. The writer suite checks the refusal.
The review asked to stop representing invalid states. The Producer kind is now a oneof with run_id only in the run-based variants, so a client can't carry a run. A write's task facts and withdraw_run move into RunWithdrawal, which only a run writer sets.
The protos moved these into variants. The crate reads them through helpers on Producer and StreamWriter, so the stored format, the epoch keys and the test vectors stay the same.
Owner
Author
|
Closed in favor of #228, the combined branch, which has this change. |
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 adds writers for Activities and clients, served through the runtime's writer calls.
sequenceorder.WriteRecordsreturns the offsets, and resends the same batch after a Store failure, so the Store writes it once.sequence. Corrupt Store data fails the writer with no retry. A refusal, such as on a closed Stream or a newer epoch, still fails the writer.free_writerneeds no Store and no async runtime, so a bridge can call it from a finalizer.Depends on #218 (K7), for the Local Activity task facts. Review lane is the Rust reviewers.
Part of the Brook review series.
Why?
Writers are the client and Activity side of the runtime, and nothing else in the crate uses them.
How did you test it?
cargo fmt,cargo clippy -- -D warnings(with and without features),cargo test -p temporalio-streams --all-featuresandcargo docpass at this commit. The writer suite runs on the memory Store here, and on Redis in R3 (temporal-community/sdk-streams#3).