提交 6a015457 编写于 作者: A antirez

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.
上级 969a4f1d
......@@ -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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册