Repository navigation
crimson/osd/osd_operations: hang requests if the objects are unfound - #58148
Conversation
7d40ed4 to
fe8d38e
Compare
|
@Matan-B @athanatos I've just modified the code as suggested, please take a look again, thanks:-) |
Matan-B
left a comment
There was a problem hiding this comment.
Great solution :) few comments
There was a problem hiding this comment.
We should probably make sure that we drop the waiting requests in this case. I'm not sure this is handled, am I missing something?
There was a problem hiding this comment.
I think, by setting exceptions to the unfound promises, requests waiting on it will receive the exceptions, so the whole rest of the client request processing will be skipped, which I think is equivalent to dropping the requests. Am I right?
There was a problem hiding this comment.
Yes, this is right. My concern is whether client request actually handles exceptions correctly by dropping them. What do you think?
There was a problem hiding this comment.
Since the client request code is now using coroutines, IIUC, exceptions should be handled explicitly (aka by try-catch). See: https://docs.seastar.io/master/tutorial.html#exceptions-in-coroutines
(CC: @athanatos)
My suggestion is to change add_unfound to return ertr instead. That way, we could handle the error explicitly without try-catch.
auto unfound = co_await do_recover_missing(
pg, m->get_hobj().get_head(), m->get_reqid());
if (unfound) {
DEBUGDPP("{} unfound, hang it for now", *pg, m->get_hobj().get_head());
co_await
pg->get_recovery_backend()->add_unfound(m->get_hobj().get_head())
).handle_error_interruptible(... {
DEBUG("dropping ...");
co_return;
});
}
We can also catch the exceptions from the couroutine in order to drop the requests instead.
There was a problem hiding this comment.
Since the client request code is now using coroutines, IIUC, exceptions should be handled explicitly (aka by try-catch). See: https://docs.seastar.io/master/tutorial.html#exceptions-in-coroutines (CC: @athanatos)
My suggestion is to change
add_unfoundto return ertr instead. That way, we could handle the error explicitly without try-catch.auto unfound = co_await do_recover_missing( pg, m->get_hobj().get_head(), m->get_reqid()); if (unfound) { DEBUGDPP("{} unfound, hang it for now", *pg, m->get_hobj().get_head()); co_await pg->get_recovery_backend()->add_unfound(m->get_hobj().get_head()) ).handle_error_interruptible(... { DEBUG("dropping ..."); co_return; }); }We can also catch the exceptions from the couroutine in order to drop the requests instead.
@Matan-B After a second thought, the exception "system_shutdown_exception" we set to the unfound promises is actually an interrupt that will be handle by the interruptor::with_interruption() method. So, we are not leaking any exceptions.
f2d1c58 to
b62e12e
Compare
|
jenkins test make check |
|
@Matan-B I added an extra commit in which the exceptions set to recovery promises are changed to another interruption |
Matan-B
left a comment
There was a problem hiding this comment.
LGTM, just a few questions
|
jenkins test make check |
|
This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved |
object is missing in the whole cluster Fixes: https://tracker.ceph.com/issues/65696 Signed-off-by: Xuehan Xu <[email protected]>
promises, instead of system_error Signed-off-by: Xuehan Xu <[email protected]>
|
Rebased |
Thanks:-) |
Fixes: https://tracker.ceph.com/issues/65696
Signed-off-by: Xuehan Xu [email protected]
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard cephadmjenkins test apijenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume toxjenkins test windowsjenkins test rook e2e