Skip to content

Conversation

@frew
Copy link

@frew frew commented Apr 3, 2024

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 tikv/tikv#9940

@frew
Copy link
Author

frew commented Apr 4, 2024

@Connor1996 and @yiwu-arbug for visibility

Copy link

@LykxSassinator LykxSassinator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx for your contribution.

IMO, the implementation of Drop is necessary for SstFileManager.

Copy link
Member

@Connor1996 Connor1996 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, please cover it in test

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

Successfully merging this pull request may close these issues.

3 participants