From: Samuel Just Date: Wed, 10 Jul 2024 17:42:31 +0000 (-0700) Subject: crimson/.../alien_store: add comment explaining coll_map X-Git-Tag: testing/wip-vshankar-testing-20240725.121331-debug~4^2~4 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=443040bc66f36953859ee2d050bacc0249a81f82;p=ceph-ci.git crimson/.../alien_store: add comment explaining coll_map Signed-off-by: Samuel Just --- diff --git a/src/crimson/os/alienstore/alien_store.h b/src/crimson/os/alienstore/alien_store.h index ad25d56c18f..bf44a2b1325 100644 --- a/src/crimson/os/alienstore/alien_store.h +++ b/src/crimson/os/alienstore/alien_store.h @@ -131,6 +131,24 @@ private: std::unique_ptr store; std::unique_ptr 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_map; }; }