Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

How to reproduce PartitionSelectorException? #2562

Closed
KimTaehee opened this issue Dec 1, 2023 · 1 comment
Closed

How to reproduce PartitionSelectorException? #2562

KimTaehee opened this issue Dec 1, 2023 · 1 comment
Labels
status: waiting-for-feedback We need additional information before we can continue

Comments

@KimTaehee
Copy link

KimTaehee commented Dec 1, 2023

Questions

First, I appreciate you keeping Lettuce active.
I faced PartitionSelectorException during manual CLUSTER FAILOVER on my production environment. So I tried to reproduce the exception but failed.
Any feedback or ideas would be very helpful.

My questions are:

  1. Is there a scenario where PartitionSelectorException might occur when running the CLUSTER FAILOVER command manually? I guess it is, but I couldn't find it.
  2. As far as I understand, I don't expect to get a PartitionSelectorException if the cluster is stable and Lettuce has refreshed the topology periodically or adaptively. If so, is there a possible way to catch and retry it? (e.g.: blocks adaptive refresh and retries the command after that)

Environment

  • Lettuce version(s): 5.2.2.RELEASE
  • Redis version: 3.2.12 cluster mode

What I already checked:

  1. Cannot determine a partition for slot #2252 (comment)
  2. https://groups.google.com/g/lettuce-redis-client-users/c/AFF00Ch6x0s/m/Y6AySSWRAgAJ
  3. PartitionSelectorException during refresh of Partitions #2178 // Only for 6.2.0.RELEASE
@mp911de
Copy link
Collaborator

mp911de commented Dec 1, 2023

PartitionSelectorException happens if there is no read or write node for a hash slot. That is, if there is no master currently serving a slot or, if the selection wants to send a command towards a replica, that there is no replica available for the slot.

You can reproduce the exception by configuring a cluster that doesn't cover all hash slots and then issuing a command against a hash slot that has no master for it.

@mp911de mp911de added the status: waiting-for-feedback We need additional information before we can continue label Dec 1, 2023
@redis redis locked and limited conversation to collaborators Dec 1, 2023
@mp911de mp911de converted this issue into discussion #2563 Dec 1, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
status: waiting-for-feedback We need additional information before we can continue
Projects
None yet
Development

No branches or pull requests

2 participants