diff --git a/src/storage/src/manifest/region.rs b/src/storage/src/manifest/region.rs index 204cc8abf07f..fa1b9de06ad8 100644 --- a/src/storage/src/manifest/region.rs +++ b/src/storage/src/manifest/region.rs @@ -44,8 +44,10 @@ pub struct RegionManifestCheckpointer { impl RegionManifestCheckpointer { pub(crate) fn set_flushed_manifest_version(&self, manifest_version: ManifestVersion) { + let current = self.flushed_manifest_version.load(Ordering::Relaxed); + self.flushed_manifest_version - .store(manifest_version, Ordering::Relaxed); + .store(current.max(manifest_version), Ordering::Relaxed); } } diff --git a/src/storage/src/region.rs b/src/storage/src/region.rs index c177ffb78563..9deda381c634 100644 --- a/src/storage/src/region.rs +++ b/src/storage/src/region.rs @@ -356,6 +356,11 @@ impl RegionImpl { .replay(recovered_metadata_after_flushed, writer_ctx) .await?; + // Update flushed manifest version after replaying + store_config + .manifest + .set_flushed_manifest_version(shared.version_control.current().manifest_version()); + let inner = Arc::new(RegionInner { shared, writer,