diff --git a/src/crimson/os/alienstore/alien_collection.h b/src/crimson/os/alienstore/alien_collection.h index 538db3dae66..17a930e77a9 100644 --- a/src/crimson/os/alienstore/alien_collection.h +++ b/src/crimson/os/alienstore/alien_collection.h @@ -21,6 +21,13 @@ public: template > seastar::futurize_t with_lock(Func&& func) { + // newer versions of Seastar provide two variants of `with_lock` + // - generic, friendly towards throwing move constructors of Func, + // - specialized for `noexcept`. + // unfortunately, the former has a limitation: the return value + // of `Func` must be compatible with `current_exception_as_future()` + // which boils down to returning `seastar::future`. + static_assert(std::is_nothrow_move_constructible_v); return seastar::with_lock(mutex, std::forward(func)); } diff --git a/src/crimson/os/alienstore/alien_store.cc b/src/crimson/os/alienstore/alien_store.cc index 3790b7d0604..904540a4c44 100644 --- a/src/crimson/os/alienstore/alien_store.cc +++ b/src/crimson/os/alienstore/alien_store.cc @@ -432,7 +432,8 @@ seastar::future<> AlienStore::do_transaction(CollectionRef ch, std::move(done), [this, ch, id] (auto &txn, auto &done) { AlienCollection* alien_coll = static_cast(ch.get()); - return alien_coll->with_lock([this, ch, id, &txn, &done] { + // moving the `ch` is crucial for buildability on newer S* versions. + return alien_coll->with_lock([this, ch=std::move(ch), id, &txn, &done] { Context *crimson_wrapper = ceph::os::Transaction::collect_all_contexts(txn); assert(tp); diff --git a/src/seastar b/src/seastar index f43e1b1a417..e692a2d3fcf 160000 --- a/src/seastar +++ b/src/seastar @@ -1 +1 @@ -Subproject commit f43e1b1a4174caf9c507e1cfbece252a95dfd467 +Subproject commit e692a2d3fcf5593b7a00ab6900ee7e7762f989ac