]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd: convert remaining IOInterruptCondition users to specify epoch
authorSamuel Just <sjust@redhat.com>
Thu, 4 Jul 2024 03:48:50 +0000 (20:48 -0700)
committerSamuel Just <sjust@redhat.com>
Thu, 11 Jul 2024 17:51:59 +0000 (10:51 -0700)
Let's be explicit about this as allowing the epoch to be grabbed out of
pg->get_osdmap_epoch() implicitely is going to be wrong fairly often.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/admin/pg_commands.cc
src/crimson/osd/osd_operations/client_request.cc
src/crimson/osd/osd_operations/logmissing_request.cc
src/crimson/osd/osd_operations/logmissing_request_reply.cc
src/crimson/osd/osd_operations/recovery_subrequest.cc
src/crimson/osd/osd_operations/replicated_request.cc
src/crimson/osd/pg.cc

index c71bd429e78a55b0fe3aed48b83a872681aaebaf..440c7a383ff74bcab2594278e4885c300b7c5f87 100644 (file)
@@ -174,7 +174,7 @@ public:
       return PG::interruptor::now();
     }, [FNAME, pg](std::exception_ptr ep) {
       DEBUGDPP("interrupted with {}", *pg, ep);
-    }, pg).then([format] {
+    }, pg, pg->get_osdmap_epoch()).then([format] {
       std::unique_ptr<Formatter> f{
        Formatter::create(format, "json-pretty", "json-pretty")
       };
index 4a721d1277fb6994f24dfda2ccc0c5401716bcb0..33d0f4c0f41282719bfc92316b8a465e1bbce270 100644 (file)
@@ -246,7 +246,7 @@ seastar::future<> ClientRequest::with_pg_process(
     }, [FNAME, this, this_instance_id, pgref](std::exception_ptr eptr) {
       DEBUGDPP("{}.{}: interrupted due to {}",
               *pgref, *this, this_instance_id, eptr);
-    }, pgref).finally(
+    }, pgref, pgref->get_osdmap_epoch()).finally(
       [this, FNAME, opref=std::move(opref), pgref,
        this_instance_id, instance_handle=std::move(instance_handle), &ihref] {
        DEBUGDPP("{}.{}: exit", *pgref, *this, this_instance_id);
index cc3448fb1ce2efecbb1fe0b9ecb3c9a011be0b14..8147c969260f73d44f19e41ff4c077cc6d6001ec 100644 (file)
@@ -89,7 +89,7 @@ seastar::future<> LogMissingRequest::with_pg(
     });
   }, [](std::exception_ptr) {
     return seastar::now();
-  }, pg).finally([this, ref=std::move(ref)] {
+  }, pg, pg->get_osdmap_epoch()).finally([this, ref=std::move(ref)] {
     logger().debug("{}: exit", *this);
     handle.exit();
   });
index 39b3debf10f596daa2b6f08d3e54d7d143719250..fb122a95cd1421fa86bdbdae09be0dd96ad65142 100644 (file)
@@ -75,7 +75,7 @@ seastar::future<> LogMissingRequestReply::with_pg(
     });
   }, [](std::exception_ptr) {
     return seastar::now();
-  }, pg).finally([this, ref=std::move(ref)] {
+  }, pg, pg->get_osdmap_epoch()).finally([this, ref=std::move(ref)] {
     logger().debug("{}: exit", *this);
     handle.exit();
   });
index e333e4b5c0afd3dcdb00631098a2fa44befd3376..f90bf9901de54d2c8e5148afa05b2d7cea6f8082 100644 (file)
@@ -43,7 +43,7 @@ seastar::future<> RecoverySubRequest::with_pg(
     });
   }, [](std::exception_ptr) {
     return seastar::now();
-  }, pgref).finally([this, opref=std::move(opref), pgref] {
+  }, pgref, pgref->get_osdmap_epoch()).finally([this, opref=std::move(opref), pgref] {
     logger().debug("{}: exit", *this);
     track_event<CompletionEvent>();
     handle.exit();
index 30adde0445ad53a4dafa7713c69f951e92e44c35..5ca11e5dd15eeb4bc0afd9f7ac30fac493907e19 100644 (file)
@@ -88,7 +88,7 @@ seastar::future<> RepRequest::with_pg(
     });
   }, [](std::exception_ptr) {
     return seastar::now();
-  }, pg).finally([this, ref=std::move(ref)] {
+  }, pg, pg->get_osdmap_epoch()).finally([this, ref=std::move(ref)] {
     logger().debug("{}: exit", *this);
     handle.exit();
   });
index 6cb3b6f05364970fd485e1345072dceddf43c0aa..b285ff0bd77ce98fa6c43bd25035549a6bf28da7 100644 (file)
@@ -578,7 +578,7 @@ void PG::on_active_actmap()
     }, [this](std::exception_ptr eptr) {
       logger().debug("{}: snap trimming interrupted", *this);
       ceph_assert(!peering_state.state_test(PG_STATE_SNAPTRIM));
-    }, pg_ref).finally([pg_ref, this] {
+    }, pg_ref, pg_ref->get_osdmap_epoch()).finally([pg_ref, this] {
       publish_stats_to_osd();
     });
   } else {