tikv / rust-rocksdb

rust wrapper for rocksdb
Apache License 2.0
276 stars 155 forks source link

Add basic SstFileManager functionality #791

Open frew opened 4 months ago

frew commented 4 months ago

This is my first contribution to rust-rocksdb. Feedback definitely welcome. In particular, I'm currently not calling the destroy method - should I put it in a Drop implementation or something else?

The goal here is primarily to be able to use SstFileManager.get_total_size in lieu of getting the total SST size from the DB object via https://github.com/tikv/tikv/blob/master/components/engine_rocks/src/util.rs#L179 as part of https://github.com/tikv/tikv/blob/2f73366be325f4bb7c0be5cf5d4add91cb98a79f/components/engine_rocks/src/misc.rs#L317 since getting that property holds the main RocksDB mutex for a long time.

With appropriate followup work, this also gets us closer to being able to enable https://github.com/tikv/tikv/issues/9940

frew commented 4 months ago

@Connor1996 and @yiwu-arbug for visibility