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

CLUSTERGETKEYSINSLOT continues to return the same keys even after they've been migrated #350

Closed
priyanjgupta opened this issue May 2, 2024 · 0 comments · Fixed by #352
Closed
Assignees
Labels
bug Something isn't working

Comments

@priyanjgupta
Copy link

Describe the bug

CLUSTERGETKEYSINSLOT returns an array of keys stored in the contacted node which are mapped to the specified hash slot. But when the node is in MIGRATING state, if some keys have migrated and the CLUSTERGETKEYSINSLOT function is called again, it returns the same keys, including those that have been migrated.

Steps to reproduce the bug

Repro:

  1. Create a cluster comprising of two nodes, N1 and N2.
  2. Add some slots to N1
  3. Add keys mapped to a slot X served by N1
  4. Set the target node N2 in importing state to import slot X from node N1
  5. Set the source node N1 in migrating state to migrate slot X to node N2
  6. Call ClusterGetKeysInSlot for slot X on N1
  7. Migrate an existing key, K1, mapped to slot X from N1 to N2
  8. Call ClusterGetKeysInSlot for slot X on N1
  9. K1, along with any other existing keys, will be included in the returned result.

Expected behavior

Following the migration of key K1 from the source node, when invoking ClusterGetKeysInSlot, the returned result should not include the migrated key K1.

Screenshots

image

Release version

No response

IDE

No response

OS version

No response

Additional context

No response

@darrenge darrenge added the bug Something isn't working label May 2, 2024
@priyanjgupta priyanjgupta removed their assignment May 2, 2024
@TalZaccai TalZaccai linked a pull request May 2, 2024 that will close this issue
@github-actions github-actions bot locked and limited conversation to collaborators Jul 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants