-
Notifications
You must be signed in to change notification settings - Fork 115
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
Add support for static topology configuration for the replication client #444
Open
Ladicek
wants to merge
9
commits into
vert-x3:master
Choose a base branch
from
Ladicek:static-topology
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
The `READONLY` command is sent to replicas as a setup command before the connection is handed to the caller. This command should only be sent to replicas in the cluster mode (see [1]). The sentinel mode didn't use it, but the replication mode did, which is a bug and causes all replicas to be ignored (because the setup command fails). This commit fixes it. [1] https://redis.io/commands/readonly/
- update Testcontainers - add logging configuration, more readable than JUL default
For each Redis deployment style (standalone, replication, sentinel, cluster), there's a class that can be used as a JUnit test rule and internally uses Testcontainers to run Redis. They provide some basic startup guarantees, so users don't need to wait for a server to come online etc. The helper class for standalone Redis allows customizing the Redis version, setting a password, and enabling TLS (including mutual TLS). The multi-node variants assume basic configuration and don't allow customization. These helper classes use the Bitnami images, because they provide environment variables for all the necessary customizations. The multi-node variants also use Docker Compose.
Ladicek
changed the title
Add support for static topology configuration for the replication client @Ladicek
Add support for static topology configuration for the replication client
Apr 5, 2024
The improvements mostly consist of using the new Redis helper classes for running standalone/replication/sentinel/cluster Redis, instead of the previous approach with a single container for multi-node deployments, which is not realistic and can hide bugs, but there are other improvements too. Notably, the TLS test uses actual Redis TLS support instead of a Vert.x-based TLS proxy, and the multi-node tests verify that data replication actually works. Some useless tests are deleted, too.
The interesting thing about the testing improvements here is support for non-Linux OSs. I don't know if it works or not, I'd appreciate if anyone with Windows or macOS tested this (just |
This was referenced Apr 5, 2024
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.
Includes other changes, especially:
RedisReplicationConnectOptions
(internal-only, but important anyway)READONLY
command to replicas (only in the cluster mode, not in replication mode)Fixes #343