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 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.ExtensionOptionsgetsbackend, and the service puts it in each ref that the crate builds, which is the one in theCreateStreamanswer.MemoryStreamExtension::from_config_bytesreads 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, andSTREAMS_REQUIRE=redis cargo test --workspaceon 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
backendpasses through.