From 9b5f5f6053872aff21181995e649f02462cd8c84 Mon Sep 17 00:00:00 2001 From: pedrocarlo Date: Mon, 2 Jun 2025 02:55:32 -0300 Subject: [PATCH] do not move_to if we are already inserting in correct place --- core/storage/btree.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/storage/btree.rs b/core/storage/btree.rs index 0e40d12b2..c2cca064a 100644 --- a/core/storage/btree.rs +++ b/core/storage/btree.rs @@ -4297,7 +4297,7 @@ impl BTreeCursor { }, None => { tracing::trace!("moved {}", moved_before); - if !moved_before { + if !moved_before && !matches!(self.state, CursorState::Write(..)) { match key { BTreeKey::IndexKey(_) => { return_if_io!(self