-
Notifications
You must be signed in to change notification settings - Fork 473
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 passing a slot range in CLUSTERX MIGRATE #2355
Comments
I'd like to learn kvrocks' cluster design by solving this problem, if it's suitable please arrange it for me. At the same time, if you have relevant information, please list it. Thank you very much! |
@PokIsemaine Sure, thank you. Free feel to ping @PragmaTwice @git-hulk @caipengbo for help or confirm anything. |
@PokIsemaine I suggest that before you start writing code, outline your solution and let's discuss it together. |
First of all, I would like to discuss the use of commands, and noting that The current form of
To be compatible with the previous command, we've only modified the form of content that SLOT_ID can accept, allowing it to accept a single slot or a range of slotrange, or both.
Do you think this is reasonable? If it makes sense, I'll continue to think about the specific design and implementation.
|
I agree with this way. |
The next thing I'd like to discuss is a more specific design: how do we migrate when we have multiple slot ranges?
In the current implementation, migration-related functions, including Some rough thoughts:
Which option do you think is more suitable? If you have a better plan, you can also come up with it, thank you very much! |
I prefer 1-SlotMigrationJob,1-Slot Range. We can seek only once for a range (the same namespace), making the changes relatively small and making it easier to determine whether a slot belongs to that slot range. HDYT @PragmaTwice @git-hulk Users are encouraged to migrate slots by slot range, and we can set a maximum number of ranges if the slot passed by the user is not contiguous. |
@PokIsemaine @caipengbo To make it simpler, perhaps another approach is implementing a single continuous slot range migration first. That said, we allow to pass |
I think ok, just pass a valid slot range. We can extend it in the future to make it more diverse. |
I'm not sure about how the current implementation is and how it handles with migration errors and rollbacks. But from my side it should not be so difficult to implement the design by @PokIsemaine. Of course we can also concentrate on extend from one slot to a slot range. |
I want to confirm what you mean
If so, I think we can do this first, and a single slot can also be unified into a single slot range. Another question is how do we handle failure situations? If some slots fail, how do we handle it?
|
The migration slot range is migrated from front to back, if a slot fails, I think, we can add this information to cluster info, like this:
|
Search before asking
Motivation
In slot migration, many users would like to be able to pass a slot range to migrate in batches.
Solution
--
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: