diff --git a/src/mito2/src/region/opener.rs b/src/mito2/src/region/opener.rs index 7b969d578d00..322485256fab 100644 --- a/src/mito2/src/region/opener.rs +++ b/src/mito2/src/region/opener.rs @@ -380,7 +380,9 @@ pub(crate) async fn replay_memtable( // data in the WAL. let mut last_entry_id = flushed_entry_id; let mut region_write_ctx = RegionWriteCtx::new(region_id, version_control, wal_options.clone()); - let mut wal_stream = wal.scan(region_id, flushed_entry_id, wal_options)?; + + let replay_from_entry_id = flushed_entry_id + 1; + let mut wal_stream = wal.scan(region_id, replay_from_entry_id, wal_options)?; while let Some(res) = wal_stream.next().await { let (entry_id, entry) = res?; last_entry_id = last_entry_id.max(entry_id);