From 5751fe8f2d5f0a182f17c6e07b85dc79dcb635a4 Mon Sep 17 00:00:00 2001 From: Samuel Just Date: Wed, 10 Jul 2024 10:42:31 -0700 Subject: [PATCH] crimson/.../alien_store: add comment explaining coll_map Signed-off-by: Samuel Just (cherry picked from commit 443040bc66f36953859ee2d050bacc0249a81f82) --- src/crimson/os/alienstore/alien_store.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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; }; } -- 2.39.5