From: Samuel Just Date: Tue, 27 Aug 2024 20:11:02 +0000 (+0000) Subject: crimson/osd: InternalClientRequests should not be repeated after interval change X-Git-Tag: v20.0.0~935^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5c280d2d3dc3c796c3a6255cf7ba5b36271b55f0;p=ceph.git crimson/osd: InternalClientRequests should not be repeated after interval change Normal cient requests are special in that we "requeue" them after an interval change if the primary did not change. This behavior exists due to a client-side optimization where the client doesn't resend the operation unless the primary changed. That's not true for InternalClientRequest (generally used for watch expirations). The primary will eventually reload and re-expire the watch once the other watchers reconnect. If we actually did want InternalClientRequests to be able to repeat after interval change, they'd need the same resettable handle mechanism normal ClientRequests use -- this implementation wouldn't actually work as it would mean the same handle reentering a previous stage. Fixes: https://tracker.ceph.com/issues/68068 Signed-off-by: Samuel Just --- diff --git a/src/crimson/osd/osd_operations/internal_client_request.cc b/src/crimson/osd/osd_operations/internal_client_request.cc index 2968a6f43859..a19bb0826f00 100644 --- a/src/crimson/osd/osd_operations/internal_client_request.cc +++ b/src/crimson/osd/osd_operations/internal_client_request.cc @@ -54,9 +54,9 @@ seastar::future<> InternalClientRequest::start() { track_event(); return crimson::common::handle_system_shutdown([this] { - return seastar::repeat([this] { LOG_PREFIX(InternalClientRequest::start); DEBUGI("{}: in repeat", *this); + return interruptor::with_interruption([this]() mutable { return enter_stage( client_pp().wait_for_active @@ -121,17 +121,12 @@ seastar::future<> InternalClientRequest::start() PG::load_obc_ertr::all_same_way([] { return seastar::now(); }) - ).then_interruptible([] { - return seastar::stop_iteration::yes; - }); - }, [this](std::exception_ptr eptr) { - if (should_abort_request(*this, std::move(eptr))) { - return seastar::stop_iteration::yes; - } else { - return seastar::stop_iteration::no; - } - }, pg, start_epoch); - }).then([this] { + ); + }, [](std::exception_ptr eptr) { + return seastar::now(); + }, pg, start_epoch + + ).then([this] { track_event(); }).handle_exception_type([](std::system_error &error) { logger().debug("error {}, message: {}", error.code(), error.what());