facebook / rocksdb

A library that provides an embeddable, persistent key-value store for fast storage.
http://rocksdb.org
GNU General Public License v2.0
28.44k stars 6.29k forks source link

RocksdB backup sync #4959

Closed bharatviswa504 closed 5 years ago

bharatviswa504 commented 5 years ago

image

bharatviswa504 commented 5 years ago

I have written a sample program and it is working on my machine, just want to know if it has any caveats or surprises by using this way?

sagar0 commented 5 years ago

This is a tough question to answer without knowing a lot of additional details of your use-case and setup environment. For example:

In short, it highly depends on how you implement your replication and backup/restore module.

To answer your point 3: if you copy the full snapshot directory of node 1, yes, you can be assured that the data will be the same. But if you somehow manually decide to copy only the "delta" of node 1's snapshots (i.e. from n to n+m), I don't think the data will be the same. This is due to what i said above: the snapshots on nodes 1 and 2 could be applied at different points in time.

bharatviswa504 commented 5 years ago

Thank You @sagar0 for info. We are using another API getUpdatesSince() together with the checkpoint to solve the issue.

mars00772 commented 3 years ago

@bharatviswa504 how to use getUpdatesSince to get the certain key and value after one seq?