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
e4a5605c
Commit
e4a5605c
authored
Jan 20, 2014
by
antirez
Browse files
Cluster: don't rewrite slaveof config directive in cluster mode.
parent
437fc2cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/config.c
View file @
e4a5605c
...
@@ -1466,8 +1466,9 @@ void rewriteConfigSlaveofOption(struct rewriteConfigState *state) {
...
@@ -1466,8 +1466,9 @@ void rewriteConfigSlaveofOption(struct rewriteConfigState *state) {
sds
line
;
sds
line
;
/* If this is a master, we want all the slaveof config options
/* If this is a master, we want all the slaveof config options
* in the file to be removed. */
* in the file to be removed. Note that if this is a cluster instance
if
(
server
.
masterhost
==
NULL
)
{
* we don't want a slaveof directive inside redis.conf. */
if
(
server
.
cluster_enabled
||
server
.
masterhost
==
NULL
)
{
rewriteConfigMarkAsProcessed
(
state
,
"slaveof"
);
rewriteConfigMarkAsProcessed
(
state
,
"slaveof"
);
return
;
return
;
}
}
...
...
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