add lock to prevent snapshot during update

This commit is contained in:
mpostma 2021-03-20 17:24:08 +01:00
parent 520f7c09ba
commit 7f6a54cb12
No known key found for this signature in database
GPG key ID: CBC8A7C1D7A28C3A
3 changed files with 46 additions and 16 deletions

View file

@ -52,6 +52,7 @@ impl<B> SnapshotService<B> {
let uuids = self.uuid_resolver_handle.snapshot(temp_snapshot_path.clone()).await?;
for uuid in uuids {
self.update_handle.snapshot(uuid, temp_snapshot_path.clone()).await?;
println!("performed snapshot for index {}", uuid);
}
Ok(())
}