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

Introduce CloseOptions::prepare_close_fn to allow pre-Close callback function #13237

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

jaykorean
Copy link
Contributor

@jaykorean jaykorean commented Dec 19, 2024

Summary

This PR addresses a current limitation where users cannot call pre-close functions when utilizing the WaitForCompact() API with options.close_db = true. By introducing CloseOptions to the Close() API, which will include a callback to be called before Closing the db, users can now execute custom code after waiting for compactions but before closing the db.

Test Plan

Unit Test updated

/db_basic_test -- --gtest_filter="*DBClose*" 
./db_compaction_test -- --gtest_filter="*WaitForCompactWithOptionToFlushAndCloseDB*" 

@jaykorean jaykorean requested a review from pdillinger December 20, 2024 00:30
@jaykorean jaykorean marked this pull request as ready for review December 20, 2024 00:30
@facebook-github-bot
Copy link
Contributor

@jaykorean has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants