From 5bec6b806670805b9b2fc68629a2125f7986b139 Mon Sep 17 00:00:00 2001 From: Chanyoung Park Date: Tue, 29 Jul 2025 08:34:24 +0000 Subject: [PATCH] crimson/.../fixed_kv_node: add assertion for pivot_idx validity Signed-off-by: Chanyoung Park --- src/crimson/os/seastore/btree/fixed_kv_node.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/crimson/os/seastore/btree/fixed_kv_node.h b/src/crimson/os/seastore/btree/fixed_kv_node.h index 2cd3b47a58fe..23d3b38f84be 100644 --- a/src/crimson/os/seastore/btree/fixed_kv_node.h +++ b/src/crimson/os/seastore/btree/fixed_kv_node.h @@ -349,6 +349,8 @@ struct FixedKVInternalNode auto replacement_right = c.cache.template alloc_new_non_data_extent( c.trans, node_size, placement_hint_t::HOT, INIT_GENERATION); + // We should do full merge if pivot_idx == right.get_size(). + ceph_assert(pivot_idx != right.get_size()); this->balance_child_ptrs( c.trans, static_cast(*this), -- 2.47.3