diff --git a/src/mito2/src/engine/open_test.rs b/src/mito2/src/engine/open_test.rs index 196ddc031d94..bffe245bfdc0 100644 --- a/src/mito2/src/engine/open_test.rs +++ b/src/mito2/src/engine/open_test.rs @@ -261,7 +261,7 @@ async fn test_open_region_skip_replay_wal() { put_rows(&engine, region_id, rows).await; let engine = env.reopen_engine(engine, MitoConfig::default()).await; - // Skip to replay the WAL. + // Skip the WAL replay . engine .handle_request( region_id, diff --git a/src/mito2/src/region/opener.rs b/src/mito2/src/region/opener.rs index 43ab9b1d68ef..ea387ef2c552 100644 --- a/src/mito2/src/region/opener.rs +++ b/src/mito2/src/region/opener.rs @@ -54,7 +54,7 @@ pub(crate) struct RegionOpener { scheduler: SchedulerRef, options: HashMap, cache_manager: Option, - skip_replay_wal: bool, + skip_wal_replay: bool, } impl RegionOpener { @@ -75,7 +75,7 @@ impl RegionOpener { scheduler, options: HashMap::new(), cache_manager: None, - skip_replay_wal: false, + skip_wal_replay: false, } } @@ -97,8 +97,9 @@ impl RegionOpener { self } - pub(crate) fn skip_replay_wal(mut self, skip: bool) -> Self { - self.skip_replay_wal = skip; + /// Sets the `skip_wal_replay`. + pub(crate) fn skip_wal_replay(mut self, skip: bool) -> Self { + self.skip_wal_replay = skip; self } @@ -242,10 +243,10 @@ impl RegionOpener { .build(); let flushed_entry_id = version.flushed_entry_id; let version_control = Arc::new(VersionControl::new(version)); - if !self.skip_replay_wal { + if !self.skip_wal_replay { replay_memtable(wal, region_id, flushed_entry_id, &version_control).await?; } else { - info!("Skip to replay the WAL for region: {}", region_id); + info!("Skip the WAL replay for region: {}", region_id); } let region = MitoRegion { diff --git a/src/mito2/src/worker/handle_open.rs b/src/mito2/src/worker/handle_open.rs index 1d0c33628870..fcd5165d0cc9 100644 --- a/src/mito2/src/worker/handle_open.rs +++ b/src/mito2/src/worker/handle_open.rs @@ -70,7 +70,7 @@ impl RegionWorkerLoop { self.scheduler.clone(), ) .options(request.options) - .skip_replay_wal(request.skip_replay_wal) + .skip_wal_replay(request.skip_replay_wal) .cache(Some(self.cache_manager.clone())) .open(&self.config, &self.wal) .await?;