Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(redis): Implement multi write Redis client #4064

Merged
merged 53 commits into from
Oct 3, 2024

Conversation

iambriccardo
Copy link
Member

@iambriccardo iambriccardo commented Sep 23, 2024

This PR implements a multi-write Redis client which contains a list of clients to which writes are dispatched. Reads are returned only from the first Redis instance.

Closes: #3900

relay-redis/src/real.rs Outdated Show resolved Hide resolved
@iambriccardo iambriccardo marked this pull request as ready for review September 25, 2024 14:36
@iambriccardo iambriccardo requested a review from a team as a code owner September 25, 2024 14:36
relay-config/src/redis.rs Outdated Show resolved Hide resolved
relay-config/src/redis.rs Outdated Show resolved Hide resolved
relay-redis/src/real.rs Outdated Show resolved Hide resolved
relay-server/src/service.rs Outdated Show resolved Hide resolved
relay-config/src/redis.rs Outdated Show resolved Hide resolved
relay-redis/src/real.rs Outdated Show resolved Hide resolved
relay-redis/src/real.rs Outdated Show resolved Hide resolved
relay-redis/src/real.rs Outdated Show resolved Hide resolved
relay-redis/src/real.rs Outdated Show resolved Hide resolved
relay-redis/src/real.rs Outdated Show resolved Hide resolved
relay-redis/src/real.rs Show resolved Hide resolved
impl RedisScripts {
/// Loads the cardinality Redis script.
pub fn load_cardinality() -> &'static RedisScript {
static SCRIPT: OnceLock<Box<RedisScript>> = OnceLock::new();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason RedisScript is not Sized even though the types all seem to be Sized. I might be overlooking something.

relay-redis/src/scripts.rs Outdated Show resolved Hide resolved
relay-server/src/service.rs Outdated Show resolved Hide resolved
relay-server/src/service.rs Outdated Show resolved Hide resolved
@iambriccardo iambriccardo merged commit 2bd9ae3 into master Oct 3, 2024
23 checks passed
@iambriccardo iambriccardo deleted the riccardo/feat/double-write-redis branch October 3, 2024 12:04
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.

Redis: Implement double write client
4 participants