Release the locks of a killed restore when it runs again; legacy test without empty folders

A killed restore left its leases for up to two hours, so the first backup of the recovered
server was refused. A backup from before 1.0.3 records no empty folders: the test now expects that.
This commit is contained in:
2026-11-06 17:34:33 +01:00
parent b14b16c66c
commit d96229f370
6 changed files with 38 additions and 7 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ final class BackupService {
try {
return $this->leases->with(PruneService::lockKey($target), LeaseService::EXCLUSIVE, 60, fn () => $this->createRun($target, $label));
} catch (LockedException) {
throw new \RuntimeException('A cleanup or another start for ' . $target->getName() . ' is running; try again later');
throw new \RuntimeException('A cleanup, a restore or another start for ' . $target->getName() . ' is running, or one was stopped by force (that clears by itself within two hours); try again later');
}
}