mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-30 08:44:27 +01:00
create indexes snapshots concurrently
This commit is contained in:
parent
e9da191b7d
commit
1f51fc8baf
@ -64,9 +64,12 @@ impl<B> SnapshotService<B> {
|
|||||||
return Ok(())
|
return Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
for uuid in uuids {
|
let tasks = uuids
|
||||||
self.update_handle.snapshot(uuid, temp_snapshot_path.clone()).await?;
|
.iter()
|
||||||
}
|
.map(|&uuid| self.update_handle.snapshot(uuid, temp_snapshot_path.clone()))
|
||||||
|
.collect::<Vec<_>>();
|
||||||
|
|
||||||
|
futures::future::try_join_all(tasks).await?;
|
||||||
|
|
||||||
let temp_snapshot_file = temp_snapshot_path.with_extension("temp");
|
let temp_snapshot_file = temp_snapshot_path.with_extension("temp");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user