zaidoon1 / rust-rocksdb

rust wrapper for rocksdb
Apache License 2.0
12 stars 3 forks source link

make ColumnFamily Sync #36

Closed zaidoon1 closed 8 months ago

zaidoon1 commented 8 months ago

This resolves a long standing issue https://github.com/rust-rocksdb/rust-rocksdb/issues/407 where because ColumnFamily is not Sync, we are not able to fetch all the cfs on startup and use them directly, instead, we are currently forced to call cf_handle on every operation to get the cf which adds unnecessary overhead

adrianrunte commented 8 months ago

Agreed, very important to make RocksDB properly usable in async code.

Besides, imho the current implementation is definitely flawed. Just looking at it from the Rust side ColumnFamily must either be Send + Sync or neither. Just Send definitely doesn't make sense.