X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/5a547b27f7e4a12ac6ecd4e0b7f7c25841018deb..8d727af8c4d309463cd463689b50ffb299b61964:/src/cluster.c diff --git a/src/cluster.c b/src/cluster.c index 2ea1b9cb..70c34aab 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -632,7 +632,8 @@ int clusterProcessPacket(clusterLink *link) { clusterNode *failing; failing = clusterLookupNode(hdr->data.fail.about.nodename); - if (failing && !(failing->flags & REDIS_NODE_FAIL)) { + if (failing && !(failing->flags & (REDIS_NODE_FAIL|REDIS_NODE_MYSELF))) + { redisLog(REDIS_NOTICE, "FAIL message received from %.40s about %.40s", hdr->sender, hdr->data.fail.about.nodename); @@ -942,6 +943,7 @@ void clusterCron(void) { node->flags &= ~REDIS_NODE_PFAIL; } else if (node->flags & REDIS_NODE_FAIL && !node->numslaves) { node->flags &= ~REDIS_NODE_FAIL; + clusterUpdateState(); } } else { /* Timeout reached. Set the noad se possibly failing if it is @@ -991,7 +993,7 @@ int clusterNodeGetSlotBit(clusterNode *n, int slot) { * an error and REDIS_ERR is returned. */ int clusterAddSlot(clusterNode *n, int slot) { redisAssert(clusterNodeSetSlotBit(n,slot) == 0); - server.cluster.slots[slot] = server.cluster.myself; + server.cluster.slots[slot] = n; printf("SLOT %d added to %.40s\n", slot, n->name); return REDIS_OK; }