]> git.saurik.com Git - redis.git/blobdiff - src/cluster.c
Variadic SADD tests
[redis.git] / src / cluster.c
index e2b8204461d7a95cda0f0e4f6f1217c718ad275a..d7e76ed437bed95708ea525c92e6ed3ade37917d 100644 (file)
@@ -943,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
@@ -993,7 +994,6 @@ int clusterNodeGetSlotBit(clusterNode *n, int slot) {
 int clusterAddSlot(clusterNode *n, int slot) {
     redisAssert(clusterNodeSetSlotBit(n,slot) == 0);
     server.cluster.slots[slot] = n;
-    printf("SLOT %d added to %.40s\n", slot, n->name);
     return REDIS_OK;
 }
 
@@ -1192,11 +1192,13 @@ void clusterCommand(redisClient *c) {
             "cluster_slots_ok:%d\r\n"
             "cluster_slots_pfail:%d\r\n"
             "cluster_slots_fail:%d\r\n"
+            "cluster_known_nodes:%lu\r\n"
             , statestr[server.cluster.state],
             slots_assigned,
             slots_ok,
             slots_pfail,
-            slots_fail
+            slots_fail,
+            dictSize(server.cluster.nodes)
         );
         addReplySds(c,sdscatprintf(sdsempty(),"$%lu\r\n",
             (unsigned long)sdslen(info)));