facebook/rocksdb

[question] Is checkpoint thread safe?

ilixiaocui opened this issue · 4 comments

During the RocksDB do checkpoint, can other threads perform read and write operations normally? Is it necessary to add locks when calling this function?

example:

thread1:

while(1) {
    (whether need lock here?)
    rocskdb.read()
}

thread2:

(do we need use lock here to prevent read/write during checkpoint?)
Status Create(DB* db, Checkpoint** checkpoint_ptr);
Status CreateCheckpoint(const std::string& checkpoint_dir);

@jamesgolick Can you help me take a look at this problem? Many thanks!

can anyone help me?

(do we need use lock here to prevent read/write during checkpoint?)

you don't, i've been using checkpoints while reading/writing in production for months now without any issues

(do we need use lock here to prevent read/write during checkpoint?)

you don't, i've been using checkpoints while reading/writing in production for months now without any issues

thanks a lot!