-
Notifications
You must be signed in to change notification settings - Fork 876
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
refactor(cluster): #2652 initiate migration process from CONFIG cmd #2667
Conversation
@@ -757,12 +770,20 @@ ClusterSlotMigration* ClusterFamily::AddMigration(std::string host_ip, uint16_t | |||
.get(); | |||
} | |||
|
|||
void ClusterFamily::RemoveFinishedIncomingMigrations() { | |||
void ClusterFamily::RemoveFinishedMigrations() { |
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.
but now we should remove a migration from the map only if it is not in the config anymore, 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.
yes I will add this functionality later when remove finalization step
struct ClusterShard { | ||
SlotRanges slot_ranges; | ||
Node master; | ||
std::vector<Node> replicas; | ||
std::vector<MigrationInfo> migrations; |
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 this can be an optional field
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 don't see any point to make it optional if it can be empty
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.
all the places that you write .migrations = {} can be removed than?
this is just optional data and I think setting .migrations = {} is redundant
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.
It's a compilation warning, because not members are initialized
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.
and if we change it to optional?
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.
the same
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.
compiler thinks that we forget about this field when we use this method of initialization
bb5ce0a
to
ec841d7
Compare
No description provided.