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

Use default fs in DestroyDB #3324

Closed
wants to merge 1 commit into from

Conversation

maysamyabandeh
Copy link
Contributor

@maysamyabandeh maysamyabandeh commented Jan 3, 2018

There seems to be a bug in btrfs that the makes readdir return recently unlink-ed files. This problem showed up in transaction_test when we call DestroyDB right after deleting the DB. Closing the DB deleted all the absolute files but one of them still showed up in the GetChildren call inside DestroyDB, which resulted in "file does not exist" error when it tried to attempt it.

FaultInjectionTestEnv::DeleteFile asserts on DeleteFile return status. By using the default fs for DestroyDB we simply ignore errors resulted from attempting to delete such files in DestroyDB.

@siying
Copy link
Contributor

siying commented Jan 3, 2018

Do you mean there is a data race between two threads? If the file is gone, then why GetChildren() returns it?

@facebook-github-bot
Copy link
Contributor

@maysamyabandeh has updated the pull request.

@maysamyabandeh
Copy link
Contributor Author

@siying The original description was incorrect. I corrected that and also applied the patch that you suggested offline.

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

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

@maysamyabandeh maysamyabandeh changed the title Remove assert(s.ok()) from ::DeleteFile Use default fs in DestroyDB Jan 4, 2018
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.

None yet

3 participants