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

FlushMemTable return ok but memtable does not synchronize flush #8173

Closed
wants to merge 7 commits into from

Conversation

zhuchong0329
Copy link
Contributor

@zhuchong0329 zhuchong0329 commented Apr 11, 2021

Fix #8046 : FlushMemTable return ok but memtable does not synchronize flush. The way to fix it is to expose RecoveryError.

Copy link
Contributor

@mrambacher mrambacher left a comment

Choose a reason for hiding this comment

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

I think this change is going to trigger a lot of failures in the "ASSERT_STATUS_CHECKED" cases.

A better approach may be to leave the code around line 2127 alone and add/copy line 2130-31 to around 2165.

@zhuchong0329 zhuchong0329 changed the title fix issue #8046 : FlushMemTable return ok but memtable does not synchronize flush Fix issue #8046 : FlushMemTable return ok but memtable does not synchronize flush Apr 12, 2021
@zhuchong0329
Copy link
Contributor Author

@mrambacher , Thanks for the reminder. I did ignore ROCKSDB_ASSERT_STATUS_CHECKED.

@ajkr
Copy link
Contributor

ajkr commented Oct 5, 2021

@zhuchong0329 this seems like a useful fix. Do you plan to try making it work with ASSERT_STATUS_CHECKED? I think you can get rid of all the early returns (e.g., L2125) and instead make them set s to a non-OK Status. Then add s.ok() to all the conditionals/loop conditions to make sure nothing meaningful executes and nothing overwrites s for the rest of the function.

@jay-zhuang jay-zhuang changed the title Fix issue #8046 : FlushMemTable return ok but memtable does not synchronize flush FlushMemTable return ok but memtable does not synchronize flush Oct 15, 2021
@facebook-github-bot
Copy link
Contributor

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

Copy link
Contributor

@jay-zhuang jay-zhuang left a comment

Choose a reason for hiding this comment

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

LGTM.

Fixed ASSERT_STATUS_CHECKED as @ajkr suggested.

@riversand963
Copy link
Contributor

What's our plan with this PR? @jay-zhuang

@facebook-github-bot
Copy link
Contributor

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

Copy link
Contributor

@ajkr ajkr left a comment

Choose a reason for hiding this comment

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

LGTM too.

@facebook-github-bot
Copy link
Contributor

@jay-zhuang 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.

When I set flush_options.wait = 1, FlushMemTable return ok but memtable does not synchronize flush
6 participants