mirror of
https://github.com/fluencelabs/redis
synced 2025-05-01 13:32:13 +00:00
min-replicas-to-write: only deny write commands.
I guess I needed another coffee...
This commit is contained in:
parent
d0d67f8d42
commit
9d1bc3efcf
@ -1740,7 +1740,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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user