From: Xuehan Xu Date: Wed, 26 Jun 2024 12:58:35 +0000 (+0800) Subject: crimson/os/seastore/btree: interrupt transactions immediately when X-Git-Tag: v19.1.1~39^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=9a54966f5c5bf5b64655e0e7974419500fb2f6e8;p=ceph.git crimson/os/seastore/btree: interrupt transactions immediately when getting children Fixes: https://tracker.ceph.com/issues/66851 Signed-off-by: Xuehan Xu (cherry picked from commit 5fc8b847c9b1705485b87af17d5af085a65eab04) --- diff --git a/src/crimson/os/seastore/btree/fixed_kv_btree.h b/src/crimson/os/seastore/btree/fixed_kv_btree.h index 5000b2e94def7..6424c3025364c 100644 --- a/src/crimson/os/seastore/btree/fixed_kv_btree.h +++ b/src/crimson/os/seastore/btree/fixed_kv_btree.h @@ -1491,9 +1491,9 @@ private: // checking the lba child must be atomic with creating // and linking the absent child if (v.has_child()) { - return v.get_child_fut().safe_then( - [on_found=std::move(on_found), node_iter, c, - parent_entry](auto child) mutable { + return trans_intr::make_interruptible(std::move(v.get_child_fut()) + ).si_then([on_found=std::move(on_found), node_iter, c, + parent_entry](auto child) { LOG_PREFIX(FixedKVBtree::lookup_internal_level); SUBTRACET(seastore_fixedkv_tree, "got child on {}, pos: {}, res: {}", @@ -1561,9 +1561,9 @@ private: // checking the lba child must be atomic with creating // and linking the absent child if (v.has_child()) { - return v.get_child_fut().safe_then( - [on_found=std::move(on_found), node_iter, c, - parent_entry](auto child) mutable { + return trans_intr::make_interruptible(std::move(v.get_child_fut()) + ).si_then([on_found=std::move(on_found), node_iter, c, + parent_entry](auto child) { LOG_PREFIX(FixedKVBtree::lookup_leaf); SUBTRACET(seastore_fixedkv_tree, "got child on {}, pos: {}, res: {}", @@ -2116,9 +2116,9 @@ private: // checking the lba child must be atomic with creating // and linking the absent child if (v.has_child()) { - return v.get_child_fut().safe_then( - [do_merge=std::move(do_merge), &pos, - donor_iter, donor_is_left, c, parent_pos](auto child) mutable { + return trans_intr::make_interruptible(std::move(v.get_child_fut()) + ).si_then([do_merge=std::move(do_merge), &pos, + donor_iter, donor_is_left, c, parent_pos](auto child) { LOG_PREFIX(FixedKVBtree::merge_level); SUBTRACET(seastore_fixedkv_tree, "got child on {}, pos: {}, res: {}",