From: Amnon Hanuhov Date: Tue, 8 Dec 2020 17:57:16 +0000 (-0500) Subject: crimson/osd_operations: Restart op processing if do_osd_ops returned eagain X-Git-Tag: v17.1.0~3042^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d4f6d210169c0db5fde09f8cf70a81bd187f1727;p=ceph.git crimson/osd_operations: Restart op processing if do_osd_ops returned eagain Signed-off-by: Amnon Hanuhov --- diff --git a/src/crimson/osd/osd_operations/client_request.cc b/src/crimson/osd/osd_operations/client_request.cc index 87b8fc788e35..3143dfc13ffa 100644 --- a/src/crimson/osd/osd_operations/client_request.cc +++ b/src/crimson/osd/osd_operations/client_request.cc @@ -140,12 +140,13 @@ seastar::future<> ClientRequest::process_op( return seastar::now(); }).then([this, &pg] { return with_blocking_future(handle.enter(pp(pg).get_obc)); - }).then([this, &pg]() -> PG::load_obc_ertr::future<> { + }).then([this, &pg, &pgref]() -> PG::load_obc_ertr::future<> { op_info.set_from_op(&*m, *pg.get_osdmap()); - return pg.with_locked_obc(m, op_info, this, [this, &pg](auto obc) { + return pg.with_locked_obc(m, op_info, this, [this, &pg, &pgref](auto obc) { return with_blocking_future( handle.enter(pp(pg).process) - ).then([this, &pg, obc] { + ).then([this, &pg, obc]() + -> crimson::errorator::future> { if (!pg.is_primary()) { // primary can handle both normal ops and balanced reads if (is_misdirected(pg)) { @@ -161,13 +162,15 @@ seastar::future<> ClientRequest::process_op( } } return pg.do_osd_ops(m, obc, op_info); - }).then([this](Ref reply) { + }).safe_then([this](Ref reply) { if (reply) { return conn->send(std::move(reply)); } else { return seastar::now(); } - }); + }, crimson::ct_error::eagain::handle([this, &pgref] { + return process_op(pgref); + })); }); }).safe_then([pgref=std::move(pgref)] { return seastar::now();