[question] Is checkpoint thread safe?
ilixiaocui opened this issue · 4 comments
ilixiaocui commented
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);
ilixiaocui commented
@jamesgolick Can you help me take a look at this problem? Many thanks!
ilixiaocui commented
can anyone help me?
zaidoon1 commented
(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
ilixiaocui commented
(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!