Skip to content

Commit 5bec6b8

Browse files
committed
crimson/.../fixed_kv_node: add assertion for pivot_idx validity
Signed-off-by: Chanyoung Park <[email protected]>
1 parent 271cf4f commit 5bec6b8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,8 @@ struct FixedKVInternalNode
349349
auto replacement_right = c.cache.template alloc_new_non_data_extent<node_type_t>(
350350
c.trans, node_size, placement_hint_t::HOT, INIT_GENERATION);
351351

352+
// We should do full merge if pivot_idx == right.get_size().
353+
ceph_assert(pivot_idx != right.get_size());
352354
this->balance_child_ptrs(
353355
c.trans,
354356
static_cast<node_type_t&>(*this),

0 commit comments

Comments
 (0)