-
Notifications
You must be signed in to change notification settings - Fork 0
Dummy implementation of CLUSTER MIGRATION #29
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
Conversation
| unsigned char owner_not_claiming_slot[CLUSTER_SLOTS / 8]; | ||
|
|
||
| /* Atomic slot migration */ | ||
| list *asm_links; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will a dest node be imported concurrently multiple slot ranges from different source nodes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, there might be multiple ongoing operations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, if so, it may be much complicated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initially, we can allow single migration operation but we should keep that in mind, it can be multiple parallel operations in future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw I'm thinking that this list will be there on source side as well, so we can run CLUSTER MIGRATION STATUS. IT is just a single list holds both importing and migrating operations on either side.
src/cluster_asm.c
Outdated
| #define ASM_IMPORT (1 << 1) | ||
| #define ASM_MIGRATE (1 << 2) | ||
|
|
||
| typedef struct asmLink { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we call it asmLink, it seems a slot-ranges migration task, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you don't like the name? cluster_legacy.c uses "link" for the connection. I just added asm prefix similar to it. Do you prefer a better name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the connection just is a part of migration task, how about asmTask
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, changed to it
makes sense to me |
Dummy implementation of CLUSTER MIGRATION
Dummy implementation of CLUSTER MIGRATION
Dummy implementation for these commands:
CLUSTER MIGRATION IMPORT start-slot end-slot [start-slot end-slot ...]CLUSTER MIGRATION STATUSCLUSTER MIGRATION CANCEL start-slot end-slot [start-slot end-slot ...]The implementation primarily handles command parsing. Import requests are simply queued without triggering any action.
@ShooterIT this is a quick implementation to get an idea about the API. Let's see if we are comfortable with this.
Please notice that CANCEL may cancel multiple operations and the reply is number of cancelled operation. I feel like this makes more sense. Let me know what you think.