• Oran Agra's avatar
    Solve a race between BGSAVE and FLUSHALL messing up the dirty counter (#13361) · 799c5e5f
    Oran Agra authored
    If we run FLUSHALL when the 'save' config is set, and there's a fork
    child ding BGSAVE, there's a chance the child is already finished, and
    the parent process is unaware of it. in that case the child will not get
    the kill signal and will finish successfully, but the parent process
    thinks it killed it and will reset the dirty counter to 0, then the
    backgroundSaveDoneHandlerDisk method can set the dirty counter to a
    negative value.
    799c5e5f
replication.c 170 KB