Speaking about what I think to be a wrong decision in MongoDB replication, I’ve found the following in a post about Redis replication:
If a slave lost the connection, it connects again, see if the master
RUNID is the same, and asks to continue from a given offset. If this
is possible, we continue, nothing is lost, and a full
resynchronization is not needed. Otherwise if the offset is about
data we no longer have in the backlog, we full resync.
The last part made me think that the behavior of Redis’s replication is exactly the same as the one described by the OP when losing data on the secondary node after setting up replication. But it is the first part that makes the difference: the slave checks first if the master is the same.
Original title and link: Redis Partial Resyncs and Synchronous Replication ( ©myNoSQL)