Merge pull request #5729 from artix75/cluster_manager_fix_cmd

Cluster Manager del-node: use CLUSTER RESET in place of SHUTDOWN
This commit is contained in:
Salvatore Sanfilippo 2019-01-09 10:11:27 +01:00 committed by GitHub
commit 14400d073b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5184,9 +5184,10 @@ static int clusterManagerCommandDeleteNode(int argc, char **argv) {
if (!success) return 0;
}
// Finally shutdown the node
clusterManagerLogInfo(">>> SHUTDOWN the node.\n");
redisReply *r = redisCommand(node->context, "SHUTDOWN");
/* Finally send CLUSTER RESET to the node. */
clusterManagerLogInfo(">>> Sending CLUSTER RESET SOFT to the "
"deleted node.\n");
redisReply *r = redisCommand(node->context, "CLUSTER RESET %s", "SOFT");
success = clusterManagerCheckRedisReply(node, r, NULL);
if (r) freeReplyObject(r);
return success;