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
{{ message }}
Repository navigation
Exponential-backoff retry is hand-rolled in three modules; host one util they can all reach #7095
All three do the same thing: run the operation, on failure wait, double the wait, give up after N attempts, surface the last failure as the cause.
They cannot share code today because of the module graph and one dependency:
amber -> common/workflow-core (amber sees workflow-core, not the reverse)
file-service -> common/workflow-core
com.twitter:util-core declared only in amber/build.sbt
So Utils (in amber) is invisible to the two blocking copies, and the Future/Timer variant cannot move down without dragging util-core with it.
Proposal:
Host the blocking variant in common/workflow-core -- it needs nothing but Thread.sleep, so no new dependency -- with the injectable-sleep seam both existing copies already use for tests.
Migrate LakeFSStorageClient.retryWithBackoff and FileService.awaitDependency onto it, keeping their current messages and interrupt handling (both restore the interrupt status and fail fast; that behavior must survive).
Leave the Future/Timer variant as Utils.retry in amber, cross-referenced from the blocking one, unless util-core also moves down later.
Related: #7088 introduced the async Utils.retry and pointed region termination at it; this issue is the part that PR deliberately left out to stay a fix.
Activity
chore(amber): bound region termination to a short backoff (apache#7088)
refactor(util): host one exponential-backoff retry (apache#7119)