]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/os/seastore/btree: interrupt transactions immediately when 58836/head
authorXuehan Xu <xuxuehan@qianxin.com>
Wed, 26 Jun 2024 12:58:35 +0000 (20:58 +0800)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 25 Jul 2024 07:47:52 +0000 (10:47 +0300)
getting children

Fixes: https://tracker.ceph.com/issues/66851
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
(cherry picked from commit 5fc8b847c9b1705485b87af17d5af085a65eab04)

src/crimson/os/seastore/btree/fixed_kv_btree.h

index 5000b2e94def798931a7323be990bb55465570e2..6424c3025364c44a071530e71410ea481c27bda6 100644 (file)
@@ -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: {}",