From 9e7d7beb4a6ac70bd0d9d31a3c2992965cd0fc28 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Tue, 8 Apr 2025 14:53:58 +0200 Subject: [PATCH] stop compacting the snapshot --- .../src/scheduler/process_snapshot_creation.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/index-scheduler/src/scheduler/process_snapshot_creation.rs b/crates/index-scheduler/src/scheduler/process_snapshot_creation.rs index f1bafed01..599991a7d 100644 --- a/crates/index-scheduler/src/scheduler/process_snapshot_creation.rs +++ b/crates/index-scheduler/src/scheduler/process_snapshot_creation.rs @@ -41,7 +41,7 @@ impl IndexScheduler { progress.update_progress(SnapshotCreationProgress::SnapshotTheIndexScheduler); let dst = temp_snapshot_dir.path().join("tasks"); fs::create_dir_all(&dst)?; - self.env.copy_to_path(dst.join("data.mdb"), CompactionOption::Enabled)?; + self.env.copy_to_path(dst.join("data.mdb"), CompactionOption::Disabled)?; // 2.2 Create a read transaction on the index-scheduler let rtxn = self.env.read_txn()?; @@ -80,7 +80,7 @@ impl IndexScheduler { let dst = temp_snapshot_dir.path().join("indexes").join(uuid.to_string()); fs::create_dir_all(&dst)?; index - .copy_to_path(dst.join("data.mdb"), CompactionOption::Enabled) + .copy_to_path(dst.join("data.mdb"), CompactionOption::Disabled) .map_err(|e| Error::from_milli(e, Some(name.to_string())))?; } @@ -90,7 +90,7 @@ impl IndexScheduler { progress.update_progress(SnapshotCreationProgress::SnapshotTheApiKeys); let dst = temp_snapshot_dir.path().join("auth"); fs::create_dir_all(&dst)?; - self.scheduler.auth_env.copy_to_path(dst.join("data.mdb"), CompactionOption::Enabled)?; + self.scheduler.auth_env.copy_to_path(dst.join("data.mdb"), CompactionOption::Disabled)?; // 5. Copy and tarball the flat snapshot progress.update_progress(SnapshotCreationProgress::CreateTheTarball);