diff --git a/meilisearch-http/src/index_controller/snapshot.rs b/meilisearch-http/src/index_controller/snapshot.rs index fc7ef7fed..b3a96baa7 100644 --- a/meilisearch-http/src/index_controller/snapshot.rs +++ b/meilisearch-http/src/index_controller/snapshot.rs @@ -64,9 +64,12 @@ impl SnapshotService { return Ok(()) } - for uuid in uuids { - self.update_handle.snapshot(uuid, temp_snapshot_path.clone()).await?; - } + let tasks = uuids + .iter() + .map(|&uuid| self.update_handle.snapshot(uuid, temp_snapshot_path.clone())) + .collect::>(); + + futures::future::try_join_all(tasks).await?; let temp_snapshot_file = temp_snapshot_path.with_extension("temp");