do not move_to if we are already inserting in correct place

This commit is contained in:
pedrocarlo
2025-06-02 02:55:32 -03:00
parent c2942a5819
commit 9b5f5f6053

View File

@@ -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