Skip to content

Commit 5fc8b84

Browse files
committed
crimson/os/seastore/btree: interrupt transactions immediately when
getting children Fixes: https://tracker.ceph.com/issues/66851 Signed-off-by: Xuehan Xu <[email protected]>
1 parent 45db16e commit 5fc8b84

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,9 +1491,9 @@ class FixedKVBtree {
14911491
// checking the lba child must be atomic with creating
14921492
// and linking the absent child
14931493
if (v.has_child()) {
1494-
return v.get_child_fut().safe_then(
1495-
[on_found=std::move(on_found), node_iter, c,
1496-
parent_entry](auto child) mutable {
1494+
return trans_intr::make_interruptible(std::move(v.get_child_fut())
1495+
).si_then([on_found=std::move(on_found), node_iter, c,
1496+
parent_entry](auto child) {
14971497
LOG_PREFIX(FixedKVBtree::lookup_internal_level);
14981498
SUBTRACET(seastore_fixedkv_tree,
14991499
"got child on {}, pos: {}, res: {}",
@@ -1561,9 +1561,9 @@ class FixedKVBtree {
15611561
// checking the lba child must be atomic with creating
15621562
// and linking the absent child
15631563
if (v.has_child()) {
1564-
return v.get_child_fut().safe_then(
1565-
[on_found=std::move(on_found), node_iter, c,
1566-
parent_entry](auto child) mutable {
1564+
return trans_intr::make_interruptible(std::move(v.get_child_fut())
1565+
).si_then([on_found=std::move(on_found), node_iter, c,
1566+
parent_entry](auto child) {
15671567
LOG_PREFIX(FixedKVBtree::lookup_leaf);
15681568
SUBTRACET(seastore_fixedkv_tree,
15691569
"got child on {}, pos: {}, res: {}",
@@ -2116,9 +2116,9 @@ class FixedKVBtree {
21162116
// checking the lba child must be atomic with creating
21172117
// and linking the absent child
21182118
if (v.has_child()) {
2119-
return v.get_child_fut().safe_then(
2120-
[do_merge=std::move(do_merge), &pos,
2121-
donor_iter, donor_is_left, c, parent_pos](auto child) mutable {
2119+
return trans_intr::make_interruptible(std::move(v.get_child_fut())
2120+
).si_then([do_merge=std::move(do_merge), &pos,
2121+
donor_iter, donor_is_left, c, parent_pos](auto child) {
21222122
LOG_PREFIX(FixedKVBtree::merge_level);
21232123
SUBTRACET(seastore_fixedkv_tree,
21242124
"got child on {}, pos: {}, res: {}",

0 commit comments

Comments
 (0)