]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/.../client_request.cc: move message decode check to with_pg
authorSamuel Just <sjust@redhat.com>
Sun, 4 Feb 2024 22:28:46 +0000 (14:28 -0800)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 16 May 2024 11:39:18 +0000 (14:39 +0300)
We only need to do this once, no need to recheck on requeue.

Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 10a9a11f5d535044f081964dc6b79813aa9bb624)

src/crimson/osd/osd_operations/client_request.cc

index 7c1e7d321cfd02e9fb84887bfa18b424e35cf263..571a6ec64a4d3f853c16dc23511f0991a5a08a6b 100644 (file)
@@ -105,9 +105,6 @@ seastar::future<> ClientRequest::with_pg_int(Ref<PG> pgref)
   LOG_PREFIX(ClientRequest::with_pg_int);
   epoch_t same_interval_since = pgref->get_interval_start_epoch();
   DEBUGDPP("{}: same_interval_since: {}", *pgref, *this, same_interval_since);
-  if (m->finish_decode()) {
-    m->clear_payload();
-  }
   const auto this_instance_id = instance_id++;
   OperationRef opref{this};
   auto instance_handle = get_instance_handle();
@@ -184,6 +181,11 @@ seastar::future<> ClientRequest::with_pg(
 {
   shard_services = &_shard_services;
   pgref->client_request_orderer.add_request(*this);
+
+  if (m->finish_decode()) {
+    m->clear_payload();
+  }
+
   auto ret = on_complete.get_future();
   std::ignore = with_pg_int(std::move(pgref));
   return ret;