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

HELLO 3 behavior breaks lettuce #126

Closed
romange opened this issue Jun 9, 2022 · 5 comments
Closed

HELLO 3 behavior breaks lettuce #126

romange opened this issue Jun 9, 2022 · 5 comments

Comments

@romange
Copy link
Collaborator

romange commented Jun 9, 2022

Based on private communication. Lettuce client stopped connecting to DF.

From reading this logic:
https://github.com/lettuce-io/lettuce-core/blob/5d3310d79967a580d172af7f6d9718ec9ed0325f/src/main/java/io/lettuce/core/RedisHandshake.java#L97

we should not return NOPROTO error upon "hello 3" command because the client code expects a ERR unknown command response.

@romange
Copy link
Collaborator Author

romange commented Jun 9, 2022

@alisaifee can you ptal? if you do not have the capacity, I will send a PR next week.

@alisaifee
Copy link
Contributor

Ouch, that's unfortunate.

Initially when I looked at the expectation in the lettuce implementation it felt like a bit of a stretch to return the 'unknown command' family of errors. However, technically the current implementation of HELLO in df is a bit of a lie still since you could pass the authentication / set name arguments and the response would be (incorrectly) "OK".

Given that, what do you think of:

  • accept only no arguments or protover=2 and return OK
  • for all other arguments return `unknown command "HELLO", with args beginning with: ...."

@romange
Copy link
Collaborator Author

romange commented Jun 9, 2022

you mean - return the 12-item array and not "OK", right?
I agree, I think we should support "hello [2]". we can even support "hello 2 setname foo" since this functionality already exists.
For all other cases - return "unknown command..."

@alisaifee
Copy link
Contributor

you mean - return the 12-item array and not "OK", right?

Apologies, my mind said HELLO RESPONSE but my fingers typed 'OK' ... not enough ☕, but yes.

@alisaifee
Copy link
Contributor

Resolved in #129

@romange romange closed this as completed Jun 12, 2022
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

No branches or pull requests

2 participants