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

Support client kill type subcommands #352

Merged
merged 2 commits into from
Aug 11, 2021
Merged

Conversation

ShooterIT
Copy link
Member

When redis-sentinel executes failover, it will send such commands to redis

r multi
r slaveof  $ip $port
r config rewrite
r client kill type normal
r client kill type pubsub
r exec

From 2.0.2, we support MULTI-EXEC, but don't support client kill type $type, so total MULTI-EXEC will be rollbacked when failing to parse unknown kill type in client command, and cause redis-sentinel fails to failover. To make it available, we should support client kill type subcommands

@ShooterIT ShooterIT requested a review from git-hulk August 10, 2021 14:47
@ShooterIT ShooterIT added bug type bug major decision Requires project management committee consensus release notes labels Aug 10, 2021
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.

Nice!

src/redis_cmd.cc Show resolved Hide resolved
@ShooterIT ShooterIT merged commit 0a185b5 into apache:unstable Aug 11, 2021
@ShooterIT ShooterIT deleted the kill_type branch August 11, 2021 06:22
ShooterIT added a commit that referenced this pull request Sep 10, 2021
Before, client subcommands must be lower cases, otherwise kvrocks will fail to execute,
so sentinel still can't failover, related to #352
ShooterIT added a commit to ShooterIT/kvrocks that referenced this pull request Sep 10, 2021
From 2.0.2, we support MULTI-EXEC, but don't support client kill type $type,
so total MULTI-EXEC will be rollbacked when failing to parse unknown kill type
in client command, and cause redis-sentinel fails to failover. To make it
available, we should support client kill type subcommands
ShooterIT added a commit to ShooterIT/kvrocks that referenced this pull request Sep 10, 2021
Before, client subcommands must be lower cases, otherwise kvrocks will fail to execute,
so sentinel still can't failover, related to apache#352
@ShooterIT ShooterIT mentioned this pull request Sep 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug type bug major decision Requires project management committee consensus release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants