summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWuYunlong <xzsyeb@126.com>2017-12-05 14:41:16 +0800
committerWuYunlong <xzsyeb@126.com>2017-12-05 14:41:16 +0800
commit3f232ebfb8712707f1a02dcc1eb532d05d0b8b71 (patch)
treec681db9bb528af154116f1045602ae73e2314b5d
parente6c3bcf9e072c8c40814577f2421b5d5184b2243 (diff)
downloadredis-3f232ebfb8712707f1a02dcc1eb532d05d0b8b71.tar.gz
fix some notes
-rw-r--r--redis.conf4
-rw-r--r--src/server.c5
2 files changed, 6 insertions, 3 deletions
diff --git a/redis.conf b/redis.conf
index 54ba1298e..7eb692a8d 100644
--- a/redis.conf
+++ b/redis.conf
@@ -296,7 +296,9 @@ dir ./
#
# 2) if slave-serve-stale-data is set to 'no' the slave will reply with
# an error "SYNC with master in progress" to all the kind of commands
-# but to INFO and SLAVEOF.
+# but to INFO, SLAVEOF, AUTH, PING, SHUTDOWN, REPLCONF, ROLE, CONFIG,
+# SUBSCRIBE, UNSUBSCRIBE, PSUBSCRIBE, PUNSUBSCRIBE, PUBLISH, PUBSUB,
+# COMMAND, POST, HOST: and LATENCY.
#
slave-serve-stale-data yes
diff --git a/src/server.c b/src/server.c
index af19b5a33..ad5eedd2e 100644
--- a/src/server.c
+++ b/src/server.c
@@ -2478,8 +2478,9 @@ int processCommand(client *c) {
return C_OK;
}
- /* Only allow INFO and SLAVEOF when slave-serve-stale-data is no and
- * we are a slave with a broken link with master. */
+ /* Only allow commands with flag "t", such as INFO, SLAVEOF and so on,
+ * when slave-serve-stale-data is no and we are a slave with a broken
+ * link with master. */
if (server.masterhost && server.repl_state != REPL_STATE_CONNECTED &&
server.repl_serve_stale_data == 0 &&
!(c->cmd->flags & CMD_STALE))