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

[question] Is checkpoint thread safe? #13013

Open
ilixiaocui opened this issue Sep 13, 2024 · 4 comments
Open

[question] Is checkpoint thread safe? #13013

ilixiaocui opened this issue Sep 13, 2024 · 4 comments

Comments

@ilixiaocui
Copy link

ilixiaocui commented Sep 13, 2024

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
Copy link
Author

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

@ilixiaocui
Copy link
Author

can anyone help me?

@zaidoon1
Copy link
Contributor

zaidoon1 commented Oct 21, 2024

(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
Copy link
Author

(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!

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

2 participants