-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Support canceling running RemoteCompaction on remote side #9725
Conversation
@jay-zhuang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
"CompactionJob::Run():Inprogress", | ||
[&](void* /*arg*/) { my_cs->SetCanceled(true); }); | ||
|
||
s = db_->CompactRange(CompactRangeOptions(), &start, &end); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is coming from a saved background error actually. Maybe assert my_cs
became true again after the CompactRange()
.
Does it still work if you make this CompactRange()
in a fresh DB or separate test case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch, I updated the test to reopen and then run CompactRange()
again, as the compaction failure is a background failure which is not recoverable.
Add the ability to cancel remote compaction on the remote side by setting `OpenAndCompactOptions.canceled` to true. Test Plan: added unittest
9f2b132
to
80cb60e
Compare
@jay-zhuang has updated the pull request. You must reimport the pull request before landing. |
80cb60e
to
34cd9fa
Compare
@jay-zhuang has updated the pull request. You must reimport the pull request before landing. |
@jay-zhuang has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
) Summary: Add the ability to cancel remote compaction on the remote side by setting `OpenAndCompactOptions.canceled` to true. Pull Request resolved: facebook#9725 Test Plan: added unittest Reviewed By: ajkr Differential Revision: D35018800 Pulled By: jay-zhuang fbshipit-source-id: be3652f9645e0347df429e42a5614d5a9b3a1ec4 Signed-off-by: tabokie <xy.tao@outlook.com>
Add the ability to cancel remote compaction on the remote side by
setting
OpenAndCompactOptions.canceled
to true.Test Plan: added unittest