-
Notifications
You must be signed in to change notification settings - Fork 467
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
Improve slot migration speed and resource consumption using raw key values #1223
Comments
@caipengbo Do you mean that we can send the write batch directly instead of the RESP format? |
@git-hulk Yup, we send the write batch directly, and the target calls the |
Got it, thanks a lot |
I'm interested in this issue, but I'm confused about
Does it means that: for a key-value pair with expire (k,v,expire), just send the (k,v) and ignore the expire? |
Yes, it ignore the expire. Let the target determine the expire. |
Do you means the case like:
|
Yes |
@caipengbo Can you submit an issue to track this? |
Yeah, I plan to solve this issue after slot batch PR merged @git-hulk |
@caipengbo Thanks a lot |
@caipengbo PR #1534 has been pending for a while. This feature is valuable since it can help the cluster migration avoid depending on the log data of the write batch except for the performance benefit. I'm very eager to see this feature done, but #1534 has too many conflicts and it's a bit hard to review for now. So I'm not sure if you're willing to continue working on this feature. If yes, I think we can
|
Indeed, the previous code was too much for CR, and I was happy to go ahead and split it up into multiple PRs. @git-hulk |
@caipengbo Thank you! |
I'm going to restart this work. I tracked some tasks in this issue, and I may change the task names in the future PRs. |
cool, can also convert those sub-tasks into tracking issues. |
Motivation
Currently, kvrocks performs slot migration by converting the data into RESP and then sending it to the destination(#430).
We made a little optimizations in #904 to speed up migration.
However, there are still some problems with command-based slot migration:
Solution
We can use rawkv-based data migration, where we directly send rocksdb's key values data to the target.
With rawkv-based migration, neither the source nor the destination need to judge expire time, which completely solves the data inconsistency problem. It is equivalent to translating the raw key values data from one instance to another.
It can save a lot of CPU by eliminating the need to convert Key-Value to the RESP.
In my tests, it can:
Plan
I decomposed this issues into those tasks:
The text was updated successfully, but these errors were encountered: