Skip to content

Fix diskless replication failure when has non-rdb child process#8070

Merged
oranagra merged 1 commit intoredis:unstablefrom
ShooterIT:non-rdb-diskless
Nov 22, 2020
Merged

Fix diskless replication failure when has non-rdb child process#8070
oranagra merged 1 commit intoredis:unstablefrom
ShooterIT:non-rdb-diskless

Conversation

@ShooterIT
Copy link
Member

@ShooterIT ShooterIT commented Nov 20, 2020

If we enable diskless replication, set repl-diskless-sync-delay to 0, and master has non-rdb child process such as rewrite aof child, master will start to a new BGSAVE but fails immediately when replicas ask for full synchronization, and master always fails to start a new BGSAVE and disconnects with replicas until non-rdb child process exists.

master log

18570:M 20 Nov 2020 21:00:08.968 - Accepted 127.0.0.1:60409
18570:M 20 Nov 2020 21:00:08.968 * Replica 127.0.0.1:21111 asks for synchronization
18570:M 20 Nov 2020 21:00:08.968 * Full resync requested by replica 127.0.0.1:21111
18570:M 20 Nov 2020 21:00:08.968 * Starting BGSAVE for SYNC with target: replicas sockets
18570:M 20 Nov 2020 21:00:08.968 # BGSAVE for replication failed

replica log

18803:S 20 Nov 2020 21:00:59.270 * MASTER <-> REPLICA sync started
18803:S 20 Nov 2020 21:00:59.270 * Non blocking connect for SYNC fired the event.
18803:S 20 Nov 2020 21:00:59.270 * Master replied to PING, replication can continue...
18803:S 20 Nov 2020 21:00:59.270 * Partial resynchronization not possible (no cached master)
18803:S 20 Nov 2020 21:00:59.270 * Master does not support PSYNC or is in error state (reply: -ERR BGSAVE failed, replication can't continue)
18803:S 20 Nov 2020 21:00:59.271 * Retrying with SYNC...
18803:S 20 Nov 2020 21:00:59.271 # I/O error reading bulk count from MASTER: Connection reset by peer
18803:S 20 Nov 2020 21:00:59.271 * Reconnecting to MASTER 127.0.0.1:21112 after failure

@oranagra oranagra merged commit f207e16 into redis:unstable Nov 22, 2020
@oranagra
Copy link
Member

thanks @ShooterIT
this bug was introduced in #6271 (not yet released in 6.0.x)

JackieXie168 pushed a commit to JackieXie168/redis that referenced this pull request Mar 2, 2021
…s#8070)

If we enable diskless replication, set repl-diskless-sync-delay to 0,
and master has non-rdb child process such as rewrite aof child, master
will try to start to a new BGSAVE but fails immediately (before fork)
when replicas ask for full synchronization, and master always fails
to start a new BGSAVE and disconnects with replicas until non-rdb
child process exists.

this bug was introduced in redis#6271 (not yet released in 6.0.x)
@ShooterIT ShooterIT deleted the non-rdb-diskless branch October 28, 2021 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants