diff options
author | Samuel Just <sjust@redhat.com> | 2024-09-30 19:21:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-30 19:21:51 +0200 |
commit | 748842a64575efae8d8a7432bf879697fab35643 (patch) | |
tree | 509057ef9eba35f26df93de12edbf71756d0f6f8 /src/crimson | |
parent | Merge pull request #59567 from clwluvw/rgw-datachangelog (diff) | |
parent | crimson/osd: remove CommonClientRequest::should_abort_request, no callers (diff) | |
download | ceph-748842a64575efae8d8a7432bf879697fab35643.tar.xz ceph-748842a64575efae8d8a7432bf879697fab35643.zip |
Merge pull request #59815 from athanatos/sjust/wip-68068
crimson: don't retain InternalClientRequest on interval change even if primary does not change
Reviewed-by: Matan Breizman <mbreizma@redhat.com>
Reviewed-by: Xuehan Xu <xuxuehan@qianxin.com>
Diffstat (limited to 'src/crimson')
3 files changed, 7 insertions, 41 deletions
diff --git a/src/crimson/osd/osd_operations/client_request_common.cc b/src/crimson/osd/osd_operations/client_request_common.cc index a56d58d2066..68638d3a7b1 100644 --- a/src/crimson/osd/osd_operations/client_request_common.cc +++ b/src/crimson/osd/osd_operations/client_request_common.cc @@ -71,30 +71,4 @@ CommonClientRequest::do_recover_missing( } } -bool CommonClientRequest::should_abort_request( - const Operation& op, - std::exception_ptr eptr) -{ - if (*eptr.__cxa_exception_type() == - typeid(::crimson::common::actingset_changed)) { - try { - std::rethrow_exception(eptr); - } catch(::crimson::common::actingset_changed& e) { - if (e.is_primary()) { - logger().debug("{} {} operation restart, acting set changed", __func__, op); - return false; - } else { - logger().debug("{} {} operation abort, up primary changed", __func__, op); - return true; - } - } - } else { - assert(*eptr.__cxa_exception_type() == - typeid(crimson::common::system_shutdown_exception)); - crimson::get_logger(ceph_subsys_osd).debug( - "{} {} operation skipped, system shutdown", __func__, op); - return true; - } -} - } // namespace crimson::osd diff --git a/src/crimson/osd/osd_operations/client_request_common.h b/src/crimson/osd/osd_operations/client_request_common.h index 951bf653799..4c3cf42777b 100644 --- a/src/crimson/osd/osd_operations/client_request_common.h +++ b/src/crimson/osd/osd_operations/client_request_common.h @@ -16,9 +16,6 @@ struct CommonClientRequest { Ref<PG> pg, const hobject_t& soid, const osd_reqid_t& reqid); - - static bool should_abort_request( - const crimson::Operation& op, std::exception_ptr eptr); }; } // namespace crimson::osd diff --git a/src/crimson/osd/osd_operations/internal_client_request.cc b/src/crimson/osd/osd_operations/internal_client_request.cc index 2968a6f4385..a19bb0826f0 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<StartEvent>(); 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<interruptor>( 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<CompletionEvent>(); }).handle_exception_type([](std::system_error &error) { logger().debug("error {}, message: {}", error.code(), error.what()); |