• Oran Agra's avatar
    diskless replication on slave side (don't store rdb to file), plus some other related fixes · 2de544cf
    Oran Agra authored
    The implementation of the diskless replication was currently diskless only on the master side.
    The slave side was still storing the received rdb file to the disk before loading it back in and parsing it.
    
    This commit adds two modes to load rdb directly from socket:
    1) when-empty
    2) using "swapdb"
    the third mode of using diskless slave by flushdb is risky and currently not included.
    
    other changes:
    --------------
    distinguish between aof configuration and state so that we can re-enable aof only when sync eventually
    succeeds (and not when exiting from readSyncBulkPayload after a failed attempt)
    also a CONFIG GET and INFO during rdb loading would have lied
    
    When loading rdb from the network, don't kill the server on short read (that can be a network error)
    
    Fix rdb check when performed on preamble AOF
    
    tests:
    run replication tests for diskless slave too
    make replication test a bit more aggressive
    Add test for diskless load swapdb
    2de544cf
redis.conf 69.7 KB