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 ASKING command #2273

Merged
merged 5 commits into from
Apr 28, 2024
Merged

Support ASKING command #2273

merged 5 commits into from
Apr 28, 2024

Conversation

jjz921024
Copy link
Contributor

Close #2168

Support ASKING command,but didn't do anythins. Because the kvrocks seems will serving the imported slot despite the lack of asking flag

if (myself_ && imported_slots_.count(slot)) {
// After the slot is migrated, new requests of the migrated slot will be moved to
// the destination server. Before the central controller change the topology, the destination
// server should record the imported slots to accept new data of the imported slots.
return Status::OK(); // I'm serving the imported slot
}

@git-hulk
Copy link
Member

Support ASKING command,but didn't do anythins. Because the kvrocks seems will serving the imported slot despite the lack of asking flag

Yes, exactly. But we can fix this behavior after supporting the ASKING command. By the way, guess we should clear the ASKING flag after executing the next query?

@jjz921024
Copy link
Contributor Author

Support ASKING command,but didn't do anythins. Because the kvrocks seems will serving the imported slot despite the lack of asking flag

Yes, exactly. But we can fix this behavior after supporting the ASKING command. By the way, guess we should clear the ASKING flag after executing the next query?

Yes, Fixing it will make kvorcks more like with redis in behavior. Let me do it.

@jjz921024
Copy link
Contributor Author

@git-hulk Hi, done it, please review

@jjz921024
Copy link
Contributor Author

I find that the kvrocks doesn't seem to return ASK error when query a key in migrating slot ?

@git-hulk
Copy link
Member

@jjz921024 Thank you! Generally looks good to me, you can fix the Go format to pass the CI.

@jjz921024
Copy link
Contributor Author

@jjz921024 Thank you! Generally looks good to me, you can fix the Go format to pass the CI.

Yes, I had fix it

Copy link

sonarcloud bot commented Apr 28, 2024

src/commands/cmd_cluster.cc Show resolved Hide resolved
@git-hulk git-hulk merged commit 3ce7c50 into apache:unstable Apr 28, 2024
31 checks passed
@jjz921024 jjz921024 deleted the asking branch April 28, 2024 11:21
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.

Add support of the command ASKING
3 participants