mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Cluster Manager: reply error catch for MEET command
This commit is contained in:
parent
65d37960e7
commit
4cc8de1a37
@ -2949,7 +2949,16 @@ assign_replicas:
|
|||||||
redisReply *reply = NULL;
|
redisReply *reply = NULL;
|
||||||
reply = CLUSTER_MANAGER_COMMAND(node, "cluster meet %s %d",
|
reply = CLUSTER_MANAGER_COMMAND(node, "cluster meet %s %d",
|
||||||
first->ip, first->port);
|
first->ip, first->port);
|
||||||
if (reply != NULL) freeReplyObject(reply);
|
int is_err = 0;
|
||||||
|
if (reply != NULL) {
|
||||||
|
if ((is_err = reply->type == REDIS_REPLY_ERROR))
|
||||||
|
CLUSTER_MANAGER_PRINT_REPLY_ERROR(node, reply->str);
|
||||||
|
freeReplyObject(reply);
|
||||||
|
} else {
|
||||||
|
is_err = 1;
|
||||||
|
fprintf(stderr, "Failed to send CLUSTER MEET command.\n");
|
||||||
|
}
|
||||||
|
if (is_err) goto cmd_err;
|
||||||
}
|
}
|
||||||
// Give one second for the join to start, in order to avoid that
|
// Give one second for the join to start, in order to avoid that
|
||||||
// waiting for cluster join will find all the nodes agree about
|
// waiting for cluster join will find all the nodes agree about
|
||||||
|
Loading…
x
Reference in New Issue
Block a user