backup: ensure no fixed index writers are left over either
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
parent
e15b76369a
commit
3cddfb29be
|
@ -457,11 +457,11 @@ impl BackupEnvironment {
|
||||||
/// Mark backup as finished
|
/// Mark backup as finished
|
||||||
pub fn finish_backup(&self) -> Result<(), Error> {
|
pub fn finish_backup(&self) -> Result<(), Error> {
|
||||||
let mut state = self.state.lock().unwrap();
|
let mut state = self.state.lock().unwrap();
|
||||||
// test if all writer are correctly closed
|
|
||||||
|
|
||||||
state.ensure_unfinished()?;
|
state.ensure_unfinished()?;
|
||||||
|
|
||||||
if state.dynamic_writers.len() != 0 {
|
// test if all writer are correctly closed
|
||||||
|
if state.dynamic_writers.len() != 0 || state.fixed_writers.len() != 0 {
|
||||||
bail!("found open index writer - unable to finish backup");
|
bail!("found open index writer - unable to finish backup");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue