Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tricky stuff, we need to flush dirty keys before rdbSave for replication. #7

Open
yihuang opened this issue Dec 5, 2014 · 0 comments

Comments

@yihuang
Copy link

yihuang commented Dec 5, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant