forked from TrueCloudLab/restic
d92957dd78
Restic continued e.g. a backup task even when it failed to renew the lock or failed to do so in time. For example if a backup client enters standby during the backup this can allow other operations like `prune` to run in the meantime (after calling `unlock`). After leaving standby the backup client will continue its backup and upload indexes which refer pack files that were removed in the meantime. This commit introduces a goroutine explicitly monitoring for locks that are not refreshed in time. To simplify the implementation there's now a separate goroutine to refresh the lock and monitor for timeouts for each lock. The monitoring goroutine would now cause the backup to fail as the client has lost it's lock in the meantime. The lock refresh goroutines are bound to the context used to lock the repository initially. The context returned by `lockRepo` is also cancelled when any of the goroutines exits. This ensures that the context is cancelled whenever for any reason the lock is no longer refreshed. |
||
---|---|---|
.. | ||
archiver | ||
backend | ||
bloblru | ||
cache | ||
checker | ||
crypto | ||
debug | ||
dump | ||
errors | ||
filter | ||
fs | ||
fuse | ||
hashing | ||
migrations | ||
options | ||
pack | ||
repository | ||
restic | ||
restorer | ||
selfupdate | ||
test | ||
textfile | ||
ui | ||
walker |