Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions src/tendisplus/cluster/cluster_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1220,14 +1220,18 @@ Status ClusterState::setSlots(CNodePtr n,
}
++idx;
}
// NOTE(takenliu): switching the slots and bumping the configEpoch
// must be executed within the same mutex lock.
if (n == getMyselfNode()) {
Status s = clusterBumpConfigEpochWithoutConsensus();
if (!s.ok()) {
LOG(ERROR) << "setSlots BumpConfigEpoch fail";
return s;
}
}
}

if (n == getMyselfNode()) {
Status s = clusterBumpConfigEpochWithoutConsensus();
if (!s.ok()) {
LOG(ERROR) << "setSlots BumpConfigEpoch fail";
return s;
}
// NOTE(wayenchen) broadcast gossip message if meta change finished
uint64_t offset = _server->getReplManager()->replicationGetOffset();
clusterBroadcastPong(CLUSTER_BROADCAST_ALL, offset);
Expand Down