简体   繁体   中英

rocksdb in multithreaded environment

I'm using rocksdb in a multithreaded environment.

All of my threads are doing get() , put() and merge() operations, potentially with the same keys.

Is rocks providing me with any built in synchronization? Is it configurable? I've gone through documentation and source code, but couldn't figure it out for certain.

There's no such synchronization.

You're only guaranteed that get , put and merge operations are atomic. However, if you are trying to read and write the same key-value pair in a multi-threaded environment, the operations' order is NOT determined. You have to do the synchronization yourself.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM