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

Add support for CLUSTER SHARDS command #2025

Closed
mp911de opened this issue Feb 28, 2022 · 3 comments
Closed

Add support for CLUSTER SHARDS command #2025

mp911de opened this issue Feb 28, 2022 · 3 comments
Labels
type: feature A new feature
Milestone

Comments

@mp911de
Copy link
Collaborator

mp911de commented Feb 28, 2022

Allows us to replace our CLUSTER NODES approach for topology discovery.

See redis/redis#10293

@mp911de mp911de added this to the 6.2.0 milestone Jul 8, 2022
@mp911de
Copy link
Collaborator Author

mp911de commented Jul 8, 2022

For the time being, we will stick to CLUSTER NODES to avoid incompatibilities in requiring a newer Redis version. It would make sense to have a config flag in ClusterClientOptions that determines whether to use CLUSTER NODES vs CLUSTER SHARDS. The latter command comes with replication-offset details allowing to skip nodes that are not yet fully replicated.

@mp911de mp911de added the type: feature A new feature label Jul 8, 2022
@mp911de
Copy link
Collaborator Author

mp911de commented Jul 8, 2022

Note: PooledClusterConnectionProvider uses Partitions.getPartitionBySlot(…) for getWriteConnection which may fail because getPartitionBySlot does not distinguish between replicas and master nodes.

@mp911de mp911de changed the title Add support for CLUSTER SHARDScommand Add support for CLUSTER SHARDS command Jul 8, 2022
mp911de added a commit that referenced this issue Jul 8, 2022
@mp911de mp911de closed this as completed Jul 8, 2022
@srgsanky
Copy link

If Lettuce supports CLUSTER SHARDS, we can make use of its health field to filter out replicas that are LOADING. The health is determined based on the replication offset which is exchanged by nodes as part of gossip. But #2488 mentions that CLUSTER SHARDS does not expose MYSELF.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature A new feature
Projects
None yet
Development

No branches or pull requests

2 participants