]> git.saurik.com Git - redis.git/commitdiff
A filed called slave_read_only added in INFO output.
authorantirez <antirez@gmail.com>
Mon, 22 Oct 2012 17:21:47 +0000 (19:21 +0200)
committerantirez <antirez@gmail.com>
Mon, 22 Oct 2012 17:22:48 +0000 (19:22 +0200)
This was an important information missing from the INFO output in the
replication section.

It obviously reflects if the slave is read only or not.

src/redis.c

index ddaa4a621ad5e8417f0552b590f5a1bf8471a5a8..463dc2aacba5420c0ad19807269e11c629cacf36 100644 (file)
@@ -2070,7 +2070,10 @@ sds genRedisInfoString(char *section) {
                     (long)server.unixtime-server.repl_down_since);
             }
             info = sdscatprintf(info,
-                "slave_priority:%d\r\n", server.slave_priority);
+                "slave_priority:%d\r\n"
+                "slave_read_only:%d\r\n",
+                server.slave_priority,
+                server.repl_slave_ro);
         }
         info = sdscatprintf(info,
             "connected_slaves:%lu\r\n",