You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've configured a hook with CONDITION_SNAPSHOT_START that pings for repo availability and has Error behaviour: ON_ERROR_RETRY_EXPONENTIAL_BACKOFF
Basically this works fine: when the hook fails for the first couple of times, retries occur with a backoff delay exponentially rising up to 1 hour, as expected.
However, after a certain amount of retries, the backoff delay suddenly drops to 0 seconds, causing constant retries.
I have no GO experince, but suppose this is caused by an overflow here:
Duration is a 64bit type if I googled correctly, so the argument won't fit after the 65th attempt. Should limit the attempt variable to stop growing when 1 hour is reached.
Btw, thanks for this nice piece of software, makes using restic almost a no-brainer :)
The text was updated successfully, but these errors were encountered:
Ouch, thanks for reporting this and appreciate the analysis. Your understanding of the bug seems right to me and makes it an easy fix -- fairly nasty bug. In the meantime I'd recommend using a fixed interval backoff e.g. 10 minutes. I'll get this patched in the next release.
I've configured a hook with CONDITION_SNAPSHOT_START that pings for repo availability and has Error behaviour: ON_ERROR_RETRY_EXPONENTIAL_BACKOFF
Basically this works fine: when the hook fails for the first couple of times, retries occur with a backoff delay exponentially rising up to 1 hour, as expected.
However, after a certain amount of retries, the backoff delay suddenly drops to 0 seconds, causing constant retries.
I have no GO experince, but suppose this is caused by an overflow here:
backrest/internal/hook/hook.go
Line 139 in a1e3a70
Duration is a 64bit type if I googled correctly, so the argument won't fit after the 65th attempt. Should limit the attempt variable to stop growing when 1 hour is reached.
Btw, thanks for this nice piece of software, makes using restic almost a no-brainer :)
The text was updated successfully, but these errors were encountered: