Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic SstFileManager functionality #791

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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

Signed-off-by: Fred Wulff <frew@cs.stanford.edu>
@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.

None yet

3 participants