mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Don't process min-slaves-to-write for slaves.
Replication is totally broken when a slave has this option, since it stops accepting updates from masters. This fixes issue #1434.
This commit is contained in:
parent
134fd9eaf4
commit
14fb0ac649
@ -2170,7 +2170,8 @@ int processCommand(redisClient *c) {
|
||||
|
||||
/* Don't accept write commands if there are not enough good slaves and
|
||||
* user configured the min-slaves-to-write option. */
|
||||
if (server.repl_min_slaves_to_write &&
|
||||
if (server.masterhost == NULL &&
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user