Skip to content

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

Description

@yihuang

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions