-
Notifications
You must be signed in to change notification settings - Fork 472
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
Syntax of HELLO is different from Redis #1403
Comments
Hi @rueian . When I implement "hello", kvrocks didn't support auth like that. |
Hi @PragmaTwice, I understand. However, from a redis client implementation perspective, this difference in syntax means that a client implementation may need to treat Kvrocks differently to work with it. I think this may put some barriers for a client to adapt to Kvrocks. |
I also prefer to allow passing the username, even though it's meaningless to Kvrocks. |
@rueian IIRC the goredis client handle the |
Aha. We change for being compatible with go-redis in #830. |
Hi @tisonkun, Yes, I am also making a go redis client, rueidis, and got a report that it doesn't work with kvrocks because of the syntax difference with redis: redis/rueidis#204 But I am not sure if goredis do special work for kvrocks or not, since its latest version doesn't work with kvrocks as well. For example: package main
import (
"context"
"fmt"
"github.com/redis/go-redis/v9"
)
func main() {
client := redis.NewClient(&redis.Options{Addr: "127.0.0.1:6666", Password: "mypass"})
fmt.Println(client.Ping(context.Background()))
} goredis actually send |
@rueian Thanks for your repro! That's a good new test case we can add to the integration test suite for verifying this issue is resolved :D |
Search before asking
Version
2.3.0
Minimal reproduce step
requirepass mypass
HELLO 2 AUTH default mypass
after connected.What did you expect to see?
mypass should be accepted.
What did you see instead?
invalid password
error.Anything Else?
Hi,
According to https://redis.io/commands/hello, the syntax of
HELLO
should beand the default username should be
default
.However, kvrocks' syntax seems to lack the username part:
https://github.com/apache/incubator-kvrocks/blob/6889b5916ab560ecd5eed79bb9786e36342f0e17/src/commands/cmd_server.cc#L660
Not sure if this is intended? But I think it will be great if matching redis' syntax.
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: