From 71b09727d9e074df14e1acde244895c888ccf83a Mon Sep 17 00:00:00 2001 From: Joao Severo Date: Thu, 31 Jul 2025 14:19:22 -0300 Subject: [PATCH] add comment clarifying the cell ordering --- core/storage/btree.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/storage/btree.rs b/core/storage/btree.rs index 302e91255..1e297b974 100644 --- a/core/storage/btree.rs +++ b/core/storage/btree.rs @@ -6533,7 +6533,9 @@ fn defragment_page(page: &PageContent, usable_space: u16) { if pc > last_offset { // Enable a fast path preventing the sort operation - // for cells that are already in a sorted order + // for cells that are already in a sorted order, since + // cell grows from right to left we check if pc is + // greater than the last offset is_physically_sorted = false; }