]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crimson/.../alien_store: add comment explaining coll_map
authorSamuel Just <sjust@redhat.com>
Wed, 10 Jul 2024 17:42:31 +0000 (10:42 -0700)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 25 Jul 2024 07:54:50 +0000 (10:54 +0300)
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 443040bc66f36953859ee2d050bacc0249a81f82)

src/crimson/os/alienstore/alien_store.h

index ad25d56c18fedd20db85145ff608fa7242baeb37..bf44a2b1325bafca0b157da0fbb1b07e65979a95 100644 (file)
@@ -131,6 +131,24 @@ private:
   std::unique_ptr<ObjectStore> store;
   std::unique_ptr<CephContext> cct;
   mutable seastar::gate op_gate;
+
+  /**
+   * coll_map
+   *
+   * Contains a reference to every CollectionRef returned to the upper layer.
+   * It's important that ObjectStore::CollectionHandle instances (in particular,
+   * those from BlueStore) not be released from seastar reactor threads.
+   * Keeping a reference here and breaking the
+   * CollectionRef->ObjectStore::CollectionHandle links in AlienStore::stop()
+   * ensures that all CollectionHandle's are released in the alien thread pool.
+   *
+   * Long term, we probably want to drop this map.  To do that two things need
+   * to happen:
+   * 1. ~AlienCollection() needs to submit the ObjectStore::CollectionHandle
+   *    instance to the alien thread pool to be released.
+   * 2. OSD shutdown needs to *guarantee* that all outstanding CollectionRefs
+   *    are released before unmounting and stopping the store.
+   */
   std::unordered_map<coll_t, CollectionRef> coll_map;
 };
 }