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

refactor: unit/auth to gocase #830

Merged
merged 1 commit into from
Sep 6, 2022
Merged

Conversation

tisonkun
Copy link
Member

@tisonkun tisonkun commented Sep 6, 2022

This closes #829.

This refers to #753. It contains changes for src/redis_connection.cc.

go-redis writes:

func (c *baseClient) initConn(ctx context.Context, cn *pool.Conn) error {
	// ...
	if err := conn.Hello(ctx, 3, username, password, "").Err(); err == nil {
		auth = true
	} else if !strings.HasPrefix(err.Error(), "ERR unknown command") {
		return err
	}
	// ...
}

But in src/redis_connection.cc we firstly check AUTH and later check unknown command so the else if branch hitted and return wrong err. I try to resolve it in Kvrocks scope but unsure whether it's the Redis manner.

cc @git-hulk @vmihailenco

@tisonkun tisonkun mentioned this pull request Sep 6, 2022
2 tasks
Copy link
Member

@git-hulk git-hulk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tisonkun tisonkun merged commit 3f0fb40 into apache:unstable Sep 6, 2022
@tisonkun tisonkun deleted the issue-829 branch September 6, 2022 16:29
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

Successfully merging this pull request may close these issues.

Move TCL test unit/auth to Go case
2 participants