Skip to content

Commit 3000efa

Browse files
authored
Merge pull request ceph#58357 from xxhdx1985126/wip-seastore-btree-interruptible-bug-fix
crimson/os/seastore/btree: interrupt transactions immediately when getting children Reviewed-by: Yingxin Cheng <[email protected]>
2 parents 365d689 + 5fc8b84 commit 3000efa

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
@@ -1493,9 +1493,9 @@ class FixedKVBtree {
14931493
// checking the lba child must be atomic with creating
14941494
// and linking the absent child
14951495
if (v.has_child()) {
1496-
return v.get_child_fut().safe_then(
1497-
[on_found=std::move(on_found), node_iter, c,
1498-
parent_entry](auto child) mutable {
1496+
return trans_intr::make_interruptible(std::move(v.get_child_fut())
1497+
).si_then([on_found=std::move(on_found), node_iter, c,
1498+
parent_entry](auto child) {
14991499
LOG_PREFIX(FixedKVBtree::lookup_internal_level);
15001500
SUBTRACET(seastore_fixedkv_tree,
15011501
"got child on {}, pos: {}, res: {}",
@@ -1563,9 +1563,9 @@ class FixedKVBtree {
15631563
// checking the lba child must be atomic with creating
15641564
// and linking the absent child
15651565
if (v.has_child()) {
1566-
return v.get_child_fut().safe_then(
1567-
[on_found=std::move(on_found), node_iter, c,
1568-
parent_entry](auto child) mutable {
1566+
return trans_intr::make_interruptible(std::move(v.get_child_fut())
1567+
).si_then([on_found=std::move(on_found), node_iter, c,
1568+
parent_entry](auto child) {
15691569
LOG_PREFIX(FixedKVBtree::lookup_leaf);
15701570
SUBTRACET(seastore_fixedkv_tree,
15711571
"got child on {}, pos: {}, res: {}",
@@ -2118,9 +2118,9 @@ class FixedKVBtree {
21182118
// checking the lba child must be atomic with creating
21192119
// and linking the absent child
21202120
if (v.has_child()) {
2121-
return v.get_child_fut().safe_then(
2122-
[do_merge=std::move(do_merge), &pos,
2123-
donor_iter, donor_is_left, c, parent_pos](auto child) mutable {
2121+
return trans_intr::make_interruptible(std::move(v.get_child_fut())
2122+
).si_then([do_merge=std::move(do_merge), &pos,
2123+
donor_iter, donor_is_left, c, parent_pos](auto child) {
21242124
LOG_PREFIX(FixedKVBtree::merge_level);
21252125
SUBTRACET(seastore_fixedkv_tree,
21262126
"got child on {}, pos: {}, res: {}",

0 commit comments

Comments
 (0)