File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
src/crimson/os/alienstore Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -233,26 +233,22 @@ seastar::future<CollectionRef> AlienStore::create_new_collection(const coll_t& c
233233 logger ().debug (" {}" , __func__);
234234 assert (tp);
235235 return tp->submit ([this , cid] {
236- return store->create_new_collection (cid);
237- }).then ([this , cid] (ObjectStore::CollectionHandle c) {
238- return seastar::make_ready_future<CollectionRef>(
239- get_alien_coll_ref (std::move (c)));
236+ ObjectStore::CollectionHandle c = store->create_new_collection (cid);
237+ return get_alien_coll_ref (std::move (c));
240238 });
241-
242239}
243240
244241seastar::future<CollectionRef> AlienStore::open_collection (const coll_t & cid)
245242{
246243 logger ().debug (" {}" , __func__);
247244 assert (tp);
248245 return tp->submit ([this , cid] {
249- return store->open_collection (cid);
250- }).then ([this ] (ObjectStore::CollectionHandle c) {
246+ ObjectStore::CollectionHandle c = store->open_collection (cid);
251247 if (!c) {
252- return seastar::make_ready_future<CollectionRef>();
248+ return CollectionRef{};
249+ } else {
250+ return get_alien_coll_ref (std::move (c));
253251 }
254- return seastar::make_ready_future<CollectionRef>(
255- get_alien_coll_ref (std::move (c)));
256252 });
257253}
258254
Original file line number Diff line number Diff line change @@ -148,6 +148,8 @@ class AlienStore final : public FuturizedStore,
148148 * instance to the alien thread pool to be released.
149149 * 2. OSD shutdown needs to *guarantee* that all outstanding CollectionRefs
150150 * are released before unmounting and stopping the store.
151+ *
152+ * coll_map is accessed exclusively from alien threadpool threads.
151153 */
152154 std::unordered_map<coll_t , CollectionRef> coll_map;
153155 CollectionRef get_alien_coll_ref (ObjectStore::CollectionHandle c);
You can’t perform that action at this time.
0 commit comments