2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-23 21:27:34 +00:00
restic/internal/backend/retry
Michael Eischer e24dd5a162 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.
2024-08-26 16:22:21 +02:00
..
backend_retry_test.go backend/retry: don't trip circuit breaker if context is canceled 2024-08-26 16:22:21 +02:00
backend_retry.go backend/retry: don't trip circuit breaker if context is canceled 2024-08-26 16:22:21 +02:00
testing.go Rename unused testing parameter to _ 2023-05-18 21:17:53 +02:00