Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
c56fbb24
Unverified
Commit
c56fbb24
authored
Dec 05, 2017
by
Salvatore Sanfilippo
Committed by
GitHub
Dec 05, 2017
Browse files
Merge pull request #4508 from trevor211/fixNotes
fix some notes
parents
479ea577
3f232ebf
Changes
2
Hide whitespace changes
Inline
Side-by-side
redis.conf
View file @
c56fbb24
...
@@ -296,7 +296,9 @@ dir ./
...
@@ -296,7 +296,9 @@ dir ./
#
#
# 2) if slave-serve-stale-data is set to 'no' the slave will reply with
# 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
# 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
slave
-
serve
-
stale
-
data
yes
...
...
src/server.c
View file @
c56fbb24
...
@@ -2478,8 +2478,9 @@ int processCommand(client *c) {
...
@@ -2478,8 +2478,9 @@ int processCommand(client *c) {
return
C_OK
;
return
C_OK
;
}
}
/* Only allow INFO and SLAVEOF when slave-serve-stale-data is no and
/* Only allow commands with flag "t", such as INFO, SLAVEOF and so on,
* we are a slave with a broken link with master. */
* 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
&&
if
(
server
.
masterhost
&&
server
.
repl_state
!=
REPL_STATE_CONNECTED
&&
server
.
repl_serve_stale_data
==
0
&&
server
.
repl_serve_stale_data
==
0
&&
!
(
c
->
cmd
->
flags
&
CMD_STALE
))
!
(
c
->
cmd
->
flags
&
CMD_STALE
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment