Repository navigation
Conversation
moetemp
force-pushed
the
moe/brook/review/streams-k4-memory-store
branch
from
October 27, 2026 07:35
c2df597 to
7fe70de
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k6-service-writes
branch
2 times, most recently
from
October 27, 2026 08:17
593a974 to
a39dd25
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k4-memory-store
branch
from
October 27, 2026 08:17
7fe70de to
12ed854
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k4-memory-store
branch
from
October 27, 2026 16:55
12ed854 to
2a15176
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k6-service-writes
branch
from
October 27, 2026 16:55
a39dd25 to
550c147
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k4-memory-store
branch
from
October 27, 2026 23:46
2a15176 to
f2287d8
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k6-service-writes
branch
2 times, most recently
from
October 28, 2026 08:55
6f26a43 to
6b804be
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k4-memory-store
branch
2 times, most recently
from
October 29, 2026 04:06
384bf80 to
cb14cea
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k6-service-writes
branch
2 times, most recently
from
October 29, 2026 08:37
5ccca2b to
f4950ec
Compare
The runtime is a plain object that a bridge builds per client and calls with a method name and proto bytes. It takes any Store through a `StoreFactory` and connects on its first call that needs the Store. The service checks each request and the Store's capabilities before it writes.
moetemp
force-pushed
the
moe/brook/review/streams-k6-service-writes
branch
from
October 29, 2026 09:17
f4950ec to
7a22520
Compare
moetemp
force-pushed
the
moe/brook/review/streams-k4-memory-store
branch
from
October 29, 2026 09:17
0e7433f to
167d0f8
Compare
The capabilities test drops default_retention and default_stream_id, which K2 and K3 removed. Its hooks are behind test-support now, so the tests turn the feature on.
No consumer reads StreamRuntime::backend, builds a memory runtime with create, or reads MEMORY_RUNTIME_NAME. StreamRuntime::name stays, since the Python bridge exposes it.
A cancel, or an Activity, child Workflow or Nexus Operation failure whose cause is a cancel, closes as canceled. An append with sequence zero needs `NEXT_SEQUENCE`, and the Store numbers it.
A Store keeps whole ms, so a shorter Retention expired the Stream at its next write. Many small Records fit under the byte limit but kept a Store busy for long.
A create fails as already_exists unless it uses the Stream or retries the create that made it. The service suite checks the order of the create errors and the close rule of a Stream with no owner.
A close carries no value, so the service builds no Record, no status and no size check. The service suite checks that a close leaves the last offset and that a second close succeeds.
The requests carry a StreamRef in ref, and a create in stream_ref. The memory config doc says StreamRef too.
The Producer and the withdraw_run of a write moved into StreamWriter. A Superseded item gives the writer back, and the suites send one.
The proto is in the protos crate now, so "the crate" no longer says which one sets it.
Each method decodes its request, so a bad one is invalid, and a typo in a method name would make it unknown. The upstream runtime layer has the same tests.
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.
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 serves the Stream service writes and describe through the runtime object.
StreamRuntimeper client and calls it with a method name and proto bytes. Core has no hook for it, and a Workflow makes each call from a Local Activity.StoreFactory, which it calls on the first call that needs a Store. So a bridge can build it with no async runtime.temporal-community/sdk-streams#1).CreateStreamis strict. A create of an open Stream fails withstream_already_exists, unless it asks forUSE_EXISTING, which keeps the Stream's Retention, or retries the create that made the Stream with the same request id. The Stream id is the id of the create's ref. A create with an owner needs a Workflow Producer and a ref whose owner is its run chain, and the answer's ref has that owner. A Retention past the largest proto Duration fails.EXPIREDfor a closed Stream that expired.RUN_FENCEuntil K7, so a retry run's write fails withstream_unsupported.Depends on #215 (K4). Review lane is the Rust reviewers.
Part of the Brook review series.
Why?
Every SDK calls the write path first, and it needs no read code. Reads get their own PR (K8).
How did you test it?
Cargo.tomlhas a dev-dependency on the crate itself withtest-support, so the integration tests can use the memory Store's test hooks in a default-features build.cargo fmt,cargo clippy -- -D warnings(with and without features),cargo test -p temporalio-streams --all-featuresandcargo docpass at this commit. The service suite runs on the memory Store here, and on Redis in R1.