mirror of
https://github.com/restic/restic.git
synced 2025-10-27 22:55:45 +00:00
backend/retry: don't trip circuit breaker if context is canceled
When the context used for a load operation is canceled, then the result is always an error independent of whether the file could be retrieved from the backend. Do not false positively trip the circuit breaker in this case. The old behavior was problematic when trying to lock a repository. When `Lock.checkForOtherLocks` listed multiple lock files in parallel and one of them fails to load, then all other loads were canceled. This cancelation was remembered by the circuit breaker, such that locking retries would fail.
This commit is contained in:
10
changelog/unreleased/pull-5011
Normal file
10
changelog/unreleased/pull-5011
Normal file
@@ -0,0 +1,10 @@
|
||||
Bugfix: Fix rare failures to retry locking a repository
|
||||
|
||||
Restic 0.17.0 could in rare cases fail to retry locking a repository if
|
||||
one of the lock files failed to load. The lock operation failed with error
|
||||
`unable to create lock in backend: circuit breaker open for file <lock/1234567890>`
|
||||
|
||||
The error handling has been fixed to correctly retry locking the repository.
|
||||
|
||||
https://github.com/restic/restic/issues/5005
|
||||
https://github.com/restic/restic/pull/5011
|
||||
Reference in New Issue
Block a user