brianfrankcooper / YCSB

Yahoo! Cloud Serving Benchmark
Apache License 2.0
4.93k stars 2.23k forks source link

How to extend YCSB to support multiple column families when load RocksDB interface #1701

Open niuniuniu14 opened 6 months ago

niuniuniu14 commented 6 months ago

When testing the performance of Rocksdb with multiple column families, I used four clients to load workloads on Rocksdb and wrote a script to execute four commands in parallel. The content is as follows: image

But only one command can be executed, and other commands cannot be executed due to resource-locked issues when initing a DB. The terminal prompts an error message as follows: image

Is this error message indicating that multiple instances are using the same database path, and a database path can only be accessed by one instance? As far as I know, Rocksdb supports multi-threaded parallel access to a DB. I guess YCSB has imposed restrictions on Rocksdb, but I don't know how to modify this restriction.

Should I make modifications against init() and clean up() methods inYCSB/core/src/main/java/site/ycsb/rocksdb/RocksDBClient.java (for example, using the CAS directive form————ReentrantLock class to reconstruct locks to RocksDBClient.class rather than synchronization primitives)?

niuniuniu14 commented 6 months ago

I encountered this issue when I try to extend YCSB to support Multi-column families for rocksdb. After modifying the key generation policy implemented in YCSB, this issue is solved

ruiming-lu commented 6 months ago

Hi @niuniuniu14 , can you share more details on this? Thank you!