• Valentino Geron's avatar
    Replica that asks for rdb only should be closed right after the rdb part (#11296) · e53bf652
    Valentino Geron authored
    The bug is that the the server keeps on sending newlines to the client.
    As a result, the receiver might not find the EOF marker since it searches
    for it only on the end of each payload it reads from the socket.
    The but only affects `CLIENT_REPL_RDBONLY`.
    This affects `redis-cli --rdb` (depending on timing)
    
    The fixed consist of two steps:
    1. The `CLIENT_REPL_RDBONLY` should be closed ASAP (we cannot
       always call to `freeClient` so we use `freeClientAsync`)
    2. Add new replication state `SLAVE_STATE_RDB_TRANSMITTED`
    e53bf652
server.h 167 KB