Skip to content

[Brook] Added the backend name to StreamRef. - #28

Closed
moetemp wants to merge 4 commits into
moe/brook/v4/s11-auto-closefrom
moe/brook/v4/s12-stream-ref-backend
Closed

moetemp wants to merge 4 commits into
moe/brook/v4/s11-auto-closefrom
moe/brook/v4/s12-stream-ref-backend

Conversation

@moetemp

@moetemp moetemp commented Oct 22, 2026

Copy link
Copy Markdown
Owner

What changed?

This PR adds the backend name to StreamRef.
StreamRef.backend (4) names the backend that holds the Stream, as the Worker and client config register it. Empty is the default backend. RedisStreamConfig.backend (10) is the name that lang registered the extension under. ExtensionOptions gets backend, and the service puts it in each ref that the crate builds, which is the one in the CreateStream answer. MemoryStreamExtension::from_config_bytes reads it too. The Store never reads the field, so a ref with any backend, or none, reaches the same Stream.

Why?

Decision S62. The serialized handle carries its backend name, so every process routes a received handle to the right backend, also with two backends in one process during a migration.

How did you test it?

cargo fmt --all -- --check, cargo clippy --workspace --tests -- -D warnings, and STREAMS_REQUIRE=redis cargo test --workspace on standalone Redis, a 3-primary Redis cluster and the memory Store.
A new service test checks that a create answer has the configured backend, that refs with the same, an empty and another backend append to and read the same Stream, and that an extension with no backend gives an empty one. The config unit test checks that backend passes through.

@moetemp

moetemp commented Oct 25, 2026

Copy link
Copy Markdown
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

@moetemp moetemp closed this Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant