From: Chanyoung Park Date: Mon, 28 Jul 2025 08:44:34 +0000 (+0000) Subject: crimson/.../linked_tree_node: fix pivot_idx assertion in balancing X-Git-Tag: v21.0.0~256^2~28^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e8f8879ceda6d0d09c278f1f8f72072baff65231;p=ceph.git crimson/.../linked_tree_node: fix pivot_idx assertion in balancing The pivot_idx is defined in the global index space of the combined left and right nodes, and since each key may have a different byte size, a pivot index that happens to be equal to r_size can still result in a valid rebalancing. Therefore, we only exclude the case where pivot_idx == l_size, which means no actual rebalancing would occur. Fixes: https://tracker.ceph.com/issues/72303 Signed-off-by: Chanyoung Park --- diff --git a/src/crimson/os/seastore/linked_tree_node.h b/src/crimson/os/seastore/linked_tree_node.h index 2dd152b07e76..8bf4097bbb0c 100644 --- a/src/crimson/os/seastore/linked_tree_node.h +++ b/src/crimson/os/seastore/linked_tree_node.h @@ -655,7 +655,7 @@ protected: size_t l_size = left.get_size(); size_t r_size = right.get_size(); - ceph_assert(pivot_idx != l_size && pivot_idx != r_size); + ceph_assert(pivot_idx != l_size); replacement_left.maybe_expand_children(pivot_idx); replacement_right.maybe_expand_children(r_size + l_size - pivot_idx);