From 3f232ebfb8712707f1a02dcc1eb532d05d0b8b71 Mon Sep 17 00:00:00 2001 From: WuYunlong Date: Tue, 5 Dec 2017 14:41:16 +0800 Subject: [PATCH] fix some notes --- redis.conf | 4 +++- src/server.c | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/redis.conf b/redis.conf index 54ba1298..7eb692a8 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 af19b5a3..ad5eedd2 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))