dragonfly icon indicating copy to clipboard operation
dragonfly copied to clipboard

Support partial sync in replication

Open adiholden opened this issue 2 years ago • 1 comments

When the link between the master and the replica breaks, for network issues or because a timeout is sensed in the master or the replica, the replica reconnects and attempts to proceed with a partial resynchronization: it means that it will try to just obtain the part of the stream of commands it missed during the disconnection. When a partial resynchronization is not possible, the replica will ask for a full resynchronization. This will involve a more complex process in which the master needs to create a snapshot of all its data, send it to the replica, and then continue sending the stream of commands as the dataset changes.

adiholden avatar Dec 20 '22 10:12 adiholden

Note: We'll need a distinction between #executed and #read, because entries can be executed out of order. Partial sync needs to be based on #read, while lag and consistency is (#read - #executed).

royjacobson avatar May 28 '23 13:05 royjacobson