I have a master and a slave using AOF. The master machine is experiencing some kind of hardware issues related to the hard disk. The slave looses connection to the master and tries partial sync, this fails and the slave requests full sync.

Master starts BGSAVE and old dump file exists from 5 months ago. Administrator kills with -9 the forked master processes that is doing the BGSAVE because there is too much IO load on the master machine. The master prints in the log that the BGSAVE was killed with -9 but he somehow decides to send the old dump log (5 months old) to the Slave. The Slave manages to receive this old dump file and loads it into memory. At this time the master machine dies fully and resulting in the Slave being promoted to master.

The Master should not have send the old dump file.

Comment From: oranagra

@NikolaBorisov not sure which version you used, but i'm quite sure it's fixed in more recent version. when the parent process detects the child exited badly, it won't use an old dump (which also doesn't match the replica buffers which started buffering when fork was issued)

Comment From: NikolaBorisov

@oranagra I figured it might be already fixed so decided to close it.