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

Prohibit the execution of cross-slot commands in MULTI #2437

Open
1 of 2 tasks
PokIsemaine opened this issue Jul 19, 2024 · 0 comments
Open
1 of 2 tasks

Prohibit the execution of cross-slot commands in MULTI #2437

PokIsemaine opened this issue Jul 19, 2024 · 0 comments
Labels
enhancement type enhancement

Comments

@PokIsemaine
Copy link
Contributor

PokIsemaine commented Jul 19, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

Motivation

I found this issue while trying to support scirpt flag allow-cross-slot-keys
Related discussions in redis:
redis/redis#10503
redis/redis#13140

kvrocks currently does not prohibit cross-slot in MULTI-EXEC. Is there any mechanism to provide protection? If not we should ban it.

Solution

I noticed that there is CanExecByMySelf to make relevant judgments, but it seems to be only suitable for checking whether the slots of multiple keys operated by a single command are the same, but does not detect the situation of multiple commands (such as MULTI-EXEC and scirpt). We may need to track multiple Commands using slots.

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@PokIsemaine PokIsemaine added the enhancement type enhancement label Jul 19, 2024
PokIsemaine added a commit to PokIsemaine/kvrocks that referenced this issue Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement type enhancement
Projects
None yet
Development

No branches or pull requests

1 participant