]> git.saurik.com Git - redis.git/blobdiff - src/redis.c
Merge branch 'unstable'
[redis.git] / src / redis.c
index b164fdd1030d9f1267dc237b54749f753a88d2ee..63b41ba841a0467f2057f3845e84880efdffeb2b 100644 (file)
@@ -1096,13 +1096,15 @@ int processCommand(redisClient *c) {
             addReplyError(c,"The cluster is down. Check with CLUSTER INFO for more information");
             return REDIS_OK;
         } else {
-            clusterNode *n = getNodeByQuery(c,cmd,c->argv,c->argc,&hashslot);
+            int ask;
+            clusterNode *n = getNodeByQuery(c,cmd,c->argv,c->argc,&hashslot,&ask);
             if (n == NULL) {
-                addReplyError(c,"Invalid cross-node request");
+                addReplyError(c,"Multi keys request invalid in cluster");
                 return REDIS_OK;
             } else if (n != server.cluster.myself) {
                 addReplySds(c,sdscatprintf(sdsempty(),
-                    "-MOVED %d %s:%d\r\n",hashslot,n->ip,n->port));
+                    "-%s %d %s:%d\r\n", ask ? "ASK" : "MOVED",
+                    hashslot,n->ip,n->port));
                 return REDIS_OK;
             }
         }
@@ -1317,20 +1319,14 @@ sds genRedisInfoString(char *section) {
             "used_memory_peak:%zu\r\n"
             "used_memory_peak_human:%s\r\n"
             "mem_fragmentation_ratio:%.2f\r\n"
-            "peak_mem_fragmentation_ratio:%.2f\r\n"
-            "use_tcmalloc:%d\r\n",
+            "mem_allocator:%s\r\n",
             zmalloc_used_memory(),
             hmem,
             zmalloc_get_rss(),
             server.stat_peak_memory,
             peak_hmem,
             zmalloc_get_fragmentation_ratio(),
-            (float)zmalloc_get_rss()/server.stat_peak_memory,
-    #ifdef USE_TCMALLOC
-            1
-    #else
-            0
-    #endif
+            REDIS_MALLOC
             );
     }