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

Fix assertion that compaction input files are freeed #13109

Closed

Conversation

jowlyzhang
Copy link
Contributor

This assertion could fail if the compaction input files were successfully trivially moved. On re-locking db mutex after successful LogAndApply, those files could have been picked up again by some other compactions. And the assertion will fail.

Example failure: P1669529213

@facebook-github-bot
Copy link
Contributor

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

@cbi42
Copy link
Member

cbi42 commented Nov 1, 2024

Does trivial move not create new FileMetaData for files in the new level?

@jowlyzhang
Copy link
Contributor Author

Does trivial move not create new FileMetaData for files in the new level?

Oh, that's a good point. It definitely should create a new FileMetaData when installing a new Version. So this assertion failure is not something specific to trivial move. It's as long as LogAndApply status is non-OK, since the manifest write call back toggles compaction_released to be true regardless of whether the manifest write succeeds or not. So if it fails, no new Version installed, files open up to be picked up again and this assertion could fail.

@facebook-github-bot
Copy link
Contributor

@jowlyzhang has updated the pull request. You must reimport the pull request before landing.

Copy link
Member

@cbi42 cbi42 left a comment

Choose a reason for hiding this comment

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

LGTM

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

@jowlyzhang has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

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

@facebook-github-bot
Copy link
Contributor

@jowlyzhang merged this pull request in 8089eae.

@jowlyzhang jowlyzhang deleted the compaction_assertion_failure branch November 5, 2024 20:30
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.

3 participants