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
2ec7875c
Commit
2ec7875c
authored
May 29, 2013
by
antirez
Browse files
min-replicas-to-write: only deny write commands.
I guess I needed another coffee...
parent
ed599d3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/redis.c
View file @
2ec7875c
...
@@ -1810,7 +1810,9 @@ int processCommand(redisClient *c) {
...
@@ -1810,7 +1810,9 @@ int processCommand(redisClient *c) {
/* Don't accept write commands if there are not enough good slaves and
/* Don't accept write commands if there are not enough good slaves and
* used configured the min-slaves-to-write option. */
* used configured the min-slaves-to-write option. */
if (server.repl_min_slaves_to_write && server.repl_min_slaves_max_lag &&
if (server.repl_min_slaves_to_write &&
server.repl_min_slaves_max_lag &&
c->cmd->flags & REDIS_CMD_WRITE &&
server.repl_good_slaves_count < server.repl_min_slaves_to_write)
server.repl_good_slaves_count < server.repl_min_slaves_to_write)
{
{
flagTransaction(c);
flagTransaction(c);
...
...
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