I've been trying to make redis-nds to pass all unit tests today, i found we got a problem with replication and debug reload command, cause they still need to use rdbSave, and rdbSave don't save the dirty keys, which cause losing data when replicating.
Simple fix is to add a call of flushDirtyKeys in rdbSave, like i did in my fix-replication branch, but which lead to another question: what if the background flushing process is running.
I'm not that familiar with lmdb api, i'm not sure is flushDirtyKeys safe to use concurrently in multiple processes. If not, then we have problem each time we call flushDirtyKeys in main process.
I've been trying to make redis-nds to pass all unit tests today, i found we got a problem with replication and
debug reloadcommand, cause they still need to userdbSave, andrdbSavedon't save the dirty keys, which cause losing data when replicating.Simple fix is to add a call of
flushDirtyKeysinrdbSave, like i did in myfix-replicationbranch, but which lead to another question: what if the background flushing process is running.I'm not that familiar with lmdb api, i'm not sure is
flushDirtyKeyssafe to use concurrently in multiple processes. If not, then we have problem each time we callflushDirtyKeysin main process.