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

[Valkey 7.2.6] Generate correct slot information in cluster shards command on primary failure #809

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

PingXie
Copy link
Member

@PingXie PingXie commented Jul 22, 2024

Cherry pick PR #790

Fix #784

…y failure (valkey-io#790)

Fix valkey-io#784

Prior to the change, `CLUSTER SHARDS` command processing might pick a
failed primary node which won't have the slot coverage information and
the slots `output` in turn would be empty. This change finds an
appropriate node which has the slot coverage information served by a
given shard and correctly displays it as part of `CLUSTER SHARDS`
output.

 Before:

 ```
 1) 1) "slots"
   2)  (empty array)
   3) "nodes"
   4) 1)  1) "id"
          2) "2936f22a490095a0a851b7956b0a88f2b67a5d44"
          ...
          9) "role"
         10) "master"
         ...
         13) "health"
         14) "fail"
 ```

 After:

 ```
 1) 1) "slots"
   2) 1) 0
       2) 5461
   3) "nodes"
   4) 1)  1) "id"
          2) "2936f22a490095a0a851b7956b0a88f2b67a5d44"
          ...
          9) "role"
         10) "master"
         ...
         13) "health"
         14) "fail"
 ```

---------

Signed-off-by: Harkrishn Patro <[email protected]>
@PingXie
Copy link
Member Author

PingXie commented Jul 23, 2024

Thanks @hwware for confirming that the failures are unrelated. Merging now and will look into de-flaking the tests separately.

@PingXie PingXie merged commit 3aaa129 into valkey-io:7.2 Jul 23, 2024
49 of 53 checks passed
@PingXie PingXie deleted the valkey-7.2 branch July 23, 2024 06:48
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.

3 participants