mirror of
https://github.com/fluencelabs/redis
synced 2025-03-18 08:30:51 +00:00
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.
This commit is contained in:
parent
5b2082ead3
commit
32563b4a5f
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user