Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,10 @@ protected synchronized void startSubServers() {
/** When the node restarts, it sends handshakes to all other nodes so they may know it is back. */
private void sendHandshake() {
for (Node node : allNodes) {
if (ClusterUtils.nodeEqual(node, thisNode)) {
// no need to shake hands with yourself
continue;
}
try {
if (ClusterDescriptor.getInstance().getConfig().isUseAsyncServer()) {
AsyncMetaClient asyncClient = (AsyncMetaClient) getAsyncClient(node);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,4 +353,10 @@ public static PartitionGroup partitionByPathTimeWithSync(
}
return partitionGroup;
}

public static boolean nodeEqual(Node node1, Node node2) {
ClusterNode clusterNode1 = new ClusterNode(node1);
ClusterNode clusterNode2 = new ClusterNode(node2);
return clusterNode1.equals(clusterNode2);
}
}