Commit 32563b4a authored by antirez's avatar antirez
Browse files

Cluster: clear the FAIL status for masters without slots.

Masters without slots don't participate to the cluster but just do
redirections, no need to take them in FAIL state if they are back
reachable.
parent 5b2082ea
......@@ -830,9 +830,10 @@ void clearNodeFailureIfNeeded(clusterNode *node) {
/* For slaves we always clear the FAIL flag if we can contact the
* node again. */
if (nodeIsSlave(node)) {
if (nodeIsSlave(node) || node->numslots == 0) {
redisLog(REDIS_NOTICE,
"Clear FAIL state for node %.40s: slave is reachable again.",
"Clear FAIL state for node %.40s: %s is reachable again.",
nodeIsSlave(node) ? "slave" : "master without slots",
node->name);
node->flags &= ~REDIS_NODE_FAIL;
clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE|CLUSTER_TODO_SAVE_CONFIG);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment