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

Finagle Redis does not handle operation redirects #871

Open
bm1549 opened this issue Aug 28, 2020 · 3 comments
Open

Finagle Redis does not handle operation redirects #871

bm1549 opened this issue Aug 28, 2020 · 3 comments

Comments

@bm1549
Copy link

bm1549 commented Aug 28, 2020

The existing Finagle Redis client does not handle operation redirects such as MOVED and ASK. It appears that this may have been supported as part of #648 but that PR was never merged.

Expected behavior

When a server in the Redis cluster responds with MOVED, the Redis client should follow the redirect to the other server.

Actual behavior

The redis client returns an error, for example com.twitter.finagle.redis.ServerError: MOVED 8607 172.16.0.4:6379

Steps to reproduce the behavior

  1. Use Redis in cluster-mode
  2. Fetch a key that exists on a node other than the primary
  3. Notice exception is thrown and the correct value is not returned
@mosesn
Copy link
Contributor

mosesn commented Sep 9, 2020

@bm1549 would you be interested in taking a stab at this? The cluster client hasn't historically been partition-aware, so I think a simple approach to this would be augmenting ServerError to treat MOVED specially so that clients know how to handle it, and a more sophisticated approach would be to try to make the redis cluster client partition-aware.

@bm1549
Copy link
Author

bm1549 commented Sep 9, 2020

@mosesn #648 seems to have implemented that, but it was never merged. I could re-open that PR and make any necessary adjustments to handle a merge conflict, but I don't have the time required to implement anything further. Let me know if that would be helpful and I can spend some time on that in the coming weeks.

@linzhiqi
Copy link

linzhiqi commented Oct 26, 2021

As the solution hasn't got released, I want to try lettuce to interact with redis cluster. The problem I'm facing is how would I make sure the client is gracefully shutdown before it's garbage-collected. @mosesn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants