]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/osd/replicated_backend: introduce replica_push_targets
authorSamuel Just <sjust@redhat.com>
Wed, 19 Feb 2025 03:59:14 +0000 (19:59 -0800)
committerSamuel Just <sjust@redhat.com>
Mon, 24 Mar 2025 20:34:42 +0000 (20:34 +0000)
We need a place to hold the obc for in-progress, multi message pushes
on the replica side in order to lock the obc during the final commit.

This could be introduced as a ReplicatedRecoveryBackend concept, but
that seems unnecessarily complicated.

Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/recovery_backend.cc
src/crimson/osd/recovery_backend.h

index 6924e26ad14dc3a127772ff048aca08ebf461983..b0dbcfba9839fb089c80fb5762ab2e8f4ddf2d7f 100644 (file)
@@ -50,6 +50,8 @@ void RecoveryBackend::clean_up(ceph::os::Transaction& t,
   });
   clear_temp_objs();
 
+  replica_push_targets.clear();
+
   for (auto& [soid, recovery_waiter] : recovering) {
     if ((recovery_waiter->pull_info
          && recovery_waiter->pull_info->is_complete())
index 13f35a7972bf8020c61b893eda2f49973a5a8492..818e85f67b1d9c282b0f39d64edaa104c36951e1 100644 (file)
@@ -272,6 +272,14 @@ protected:
   virtual interruptible_future<> handle_backfill_op(
     Ref<MOSDFastDispatchOp> m,
     crimson::net::ConnectionXcoreRef conn);
+
+  /**
+   * replica_push_targets
+   *
+   * Holds obc on replica for in-progress pushes, see
+   * ReplicatedRecoveryBackend::handle_push
+   */
+  std::map<hobject_t, crimson::osd::ObjectContextRef> replica_push_targets;
 private:
   void handle_backfill_finish(
     MOSDPGBackfill& m,