min-replicas-to-write: only deny write commands.

I guess I needed another coffee...
This commit is contained in:
antirez 2013-05-29 11:45:40 +02:00
parent ed599d3aca
commit 2ec7875cbf

View File

@ -1810,7 +1810,9 @@ int processCommand(redisClient *c) {
/* Don't accept write commands if there are not enough good slaves and
* 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)
{
flagTransaction(c);