-
Notifications
You must be signed in to change notification settings - Fork 632
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
Maintain determinstic ordering of replica(s) in CLUSTER SLOTS response #265
Conversation
Signed-off-by: Harkrishn Patro <harkrisp@amazon.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for migrating this one!
It'd be nice to add a test case that verifies that the responses are identical from all nodes in the cluster.
@zuiderkwast Actually we do compare CLUSTER SLOTS response across nodes in lot's of TCL tests via @VoletiRam is fixing the |
This was broadly approved before the switch over, so I think it's safe to move forward with it now. We should update the docs page though for it. |
valkey-io#265) Sort `clusterNode.slaves` while adding a new replica to the cluster on basis of `name`. This will enable deterministic ordering of replica(s) information in `CLUSTER SLOTS` response. Before this change: ``` 127.0.0.1:6380> CLUSTER SLOTS 1) 1) (integer) 0 2) (integer) 16383 3) 1) "127.0.0.1" 2) (integer) 6379 3) "fc72609a620c62d073a31eed9ddde5104c1fa302" 4) (empty array) 4) 1) "127.0.0.1" 2) (integer) 6381 3) "fac84bbf2ffc5cfcdebc92c06b8ead9c3cba4051" 4) (empty array) 5) 1) "127.0.0.1" 2) (integer) 6380 3) "b1249d394326f1485df0b895f2fd38e141aa5056" 4) (empty array) ``` After this change: ``` 127.0.0.1:6380> CLUSTER SLOTS 1) 1) (integer) 0 2) (integer) 16383 3) 1) "127.0.0.1" 2) (integer) 6379 3) "fc72609a620c62d073a31eed9ddde5104c1fa302" 4) (empty array) 4) 1) "127.0.0.1" 2) (integer) 6380 3) "b1249d394326f1485df0b895f2fd38e141aa5056" 4) (empty array) 5) 1) "127.0.0.1" 2) (integer) 6381 3) "fac84bbf2ffc5cfcdebc92c06b8ead9c3cba4051" 4) (empty array) ``` Signed-off-by: Harkrishn Patro <harkrisp@amazon.com>
ref: valkey-io/valkey#265 Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
ref: valkey-io/valkey#265 Signed-off-by: Roshan Khatri <rvkhatri@amazon.com>
Update cluster-slots docs ref: valkey-io/valkey#265 --------- Signed-off-by: Roshan Khatri <rvkhatri@amazon.com> Signed-off-by: Madelyn Olson <madelyneolson@gmail.com> Co-authored-by: Madelyn Olson <madelyneolson@gmail.com>
…#159) Update cluster-slots docs ref: valkey-io/valkey#265 --------- Signed-off-by: Roshan Khatri <rvkhatri@amazon.com> Signed-off-by: Madelyn Olson <madelyneolson@gmail.com> Co-authored-by: Madelyn Olson <madelyneolson@gmail.com> Signed-off-by: asafpamzn <97948347+asafpamzn@users.noreply.github.com>
Sort
clusterNode.slaves
while adding a new replica to the cluster on basis ofname
. This will enable deterministic ordering of replica(s) information inCLUSTER SLOTS
response.Before this change:
After this change:
ref: redis/redis#13149