• antirez's avatar
    Replication: when possible start RDB saving ASAP. · 03f5b508
    antirez authored
    In a previous commit the replication code was changed in order to
    centralize the BGSAVE for replication trigger in replicationCron(),
    however after further testings, the 1 second delay imposed by this
    change is not acceptable.
    
    So now the BGSAVE is only delayed if the AOF rewriting process is
    active. However past comments made sure that replicationCron() is always
    able to trigger the BGSAVE when needed, making the code generally more
    robust.
    
    The new code is more similar to the initial @oranagra patch where the
    BGSAVE was delayed only if an AOF rewrite was in progress.
    
    Trivia: delaying the BGSAVE uncovered a minor Sentinel issue that is now
    fixed.
    03f5b508
replication.c 92.6 KB