mirror of
				https://github.com/meilisearch/meilisearch.git
				synced 2025-11-04 01:46:28 +00:00 
			
		
		
		
	Merge pull request #5498 from meilisearch/snapshot-no-compaction
Stop compacting the snapshot
This commit is contained in:
		@@ -41,7 +41,7 @@ impl IndexScheduler {
 | 
				
			|||||||
        progress.update_progress(SnapshotCreationProgress::SnapshotTheIndexScheduler);
 | 
					        progress.update_progress(SnapshotCreationProgress::SnapshotTheIndexScheduler);
 | 
				
			||||||
        let dst = temp_snapshot_dir.path().join("tasks");
 | 
					        let dst = temp_snapshot_dir.path().join("tasks");
 | 
				
			||||||
        fs::create_dir_all(&dst)?;
 | 
					        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
 | 
					        // 2.2 Create a read transaction on the index-scheduler
 | 
				
			||||||
        let rtxn = self.env.read_txn()?;
 | 
					        let rtxn = self.env.read_txn()?;
 | 
				
			||||||
@@ -80,7 +80,7 @@ impl IndexScheduler {
 | 
				
			|||||||
            let dst = temp_snapshot_dir.path().join("indexes").join(uuid.to_string());
 | 
					            let dst = temp_snapshot_dir.path().join("indexes").join(uuid.to_string());
 | 
				
			||||||
            fs::create_dir_all(&dst)?;
 | 
					            fs::create_dir_all(&dst)?;
 | 
				
			||||||
            index
 | 
					            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())))?;
 | 
					                .map_err(|e| Error::from_milli(e, Some(name.to_string())))?;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -90,7 +90,7 @@ impl IndexScheduler {
 | 
				
			|||||||
        progress.update_progress(SnapshotCreationProgress::SnapshotTheApiKeys);
 | 
					        progress.update_progress(SnapshotCreationProgress::SnapshotTheApiKeys);
 | 
				
			||||||
        let dst = temp_snapshot_dir.path().join("auth");
 | 
					        let dst = temp_snapshot_dir.path().join("auth");
 | 
				
			||||||
        fs::create_dir_all(&dst)?;
 | 
					        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
 | 
					        // 5. Copy and tarball the flat snapshot
 | 
				
			||||||
        progress.update_progress(SnapshotCreationProgress::CreateTheTarball);
 | 
					        progress.update_progress(SnapshotCreationProgress::CreateTheTarball);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user