]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: should_abort_request() dumps Operation's details.
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Wed, 9 Jun 2021 19:18:33 +0000 (19:18 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Mon, 14 Jun 2021 12:26:22 +0000 (12:26 +0000)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/osd_operations/client_request.cc
src/crimson/osd/osd_operations/client_request_common.cc
src/crimson/osd/osd_operations/client_request_common.h
src/crimson/osd/osd_operations/internal_client_request.cc

index 4d7d334e03ef9afc30142cf2119d57ba5e71a927..14c576a534d64c503d496c5fb218e9924265d4b6 100644 (file)
@@ -124,7 +124,7 @@ seastar::future<> ClientRequest::start()
             return seastar::stop_iteration::yes;
           });
        }, [this, pgref](std::exception_ptr eptr) {
-          if (should_abort_request(std::move(eptr))) {
+          if (should_abort_request(*this, std::move(eptr))) {
             return seastar::stop_iteration::yes;
           } else {
             sequencer.maybe_reset(get_id());
index 37e12845b203d88efb118efcaa0206270848180b..90916e4235990f05fc2df905073f3afc59b87938 100644 (file)
@@ -33,7 +33,9 @@ CommonClientRequest::do_recover_missing(
   }
 }
 
-bool CommonClientRequest::should_abort_request(std::exception_ptr eptr)
+bool CommonClientRequest::should_abort_request(
+  const Operation& op,
+  std::exception_ptr eptr)
 {
   if (*eptr.__cxa_exception_type() ==
       typeid(::crimson::common::actingset_changed)) {
@@ -41,10 +43,10 @@ bool CommonClientRequest::should_abort_request(std::exception_ptr eptr)
       std::rethrow_exception(eptr);
     } catch(::crimson::common::actingset_changed& e) {
       if (e.is_primary()) {
-        logger().debug("{} operation restart, acting set changed", __func__);
+        logger().debug("{} {} operation restart, acting set changed", __func__, op);
         return false;
       } else {
-        logger().debug("{} operation abort, up primary changed", __func__);
+        logger().debug("{} {} operation abort, up primary changed", __func__, op);
         return true;
       }
     }
@@ -52,7 +54,7 @@ bool CommonClientRequest::should_abort_request(std::exception_ptr eptr)
     assert(*eptr.__cxa_exception_type() ==
       typeid(crimson::common::system_shutdown_exception));
     crimson::get_logger(ceph_subsys_osd).debug(
-        "{} operation skipped, system shutdown", __func__);
+        "{} {} operation skipped, system shutdown", __func__, op);
     return true;
   }
 }
index d3b4c0b5218afc2f3faa549a8c204c0a73f350e5..6a8a789668c180aee619440b53c6a18bc24de953 100644 (file)
@@ -3,6 +3,7 @@
 
 #pragma once
 
+#include "crimson/common/operation.h"
 #include "crimson/common/type_helpers.h"
 #include "crimson/osd/osd_operation.h"
 
@@ -12,7 +13,8 @@ struct CommonClientRequest {
   static InterruptibleOperation::template interruptible_future<>
   do_recover_missing(Ref<PG>& pg, const hobject_t& soid);
 
-  static bool should_abort_request(std::exception_ptr eptr);
+  static bool should_abort_request(
+    const crimson::Operation& op, std::exception_ptr eptr);
 };
 
 } // namespace crimson::osd
index 6d615d828a2f64fb1739542b580afd91050a45e0..3dd148cd241311e882c84e63840fda007ee6bba6 100644 (file)
@@ -102,8 +102,8 @@ seastar::future<> InternalClientRequest::start()
             });
           });
         });
-      }, [](std::exception_ptr eptr) {
-        if (should_abort_request(std::move(eptr))) {
+      }, [this](std::exception_ptr eptr) {
+        if (should_abort_request(*this, std::move(eptr))) {
           return seastar::stop_iteration::yes;
         } else {
           return seastar::stop_iteration::no;