Skip to content

Commit

Permalink
[fix] [ml] Fix retry mechanism of deleting ledgers to invalidate (#21869
Browse files Browse the repository at this point in the history
)
  • Loading branch information
poorbarcode authored and merlimat committed Jan 9, 2024
1 parent fe1d9ef commit 11eee3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3195,7 +3195,7 @@ void offloadLoop(CompletableFuture<PositionImpl> promise, Queue<LedgerInfo> ledg
.thenCompose(readHandle -> config.getLedgerOffloader().offload(readHandle, uuid, extraMetadata))
.thenCompose((ignore) -> {
return Retries.run(Backoff.exponentialJittered(TimeUnit.SECONDS.toMillis(1),
TimeUnit.SECONDS.toHours(1)).limit(10),
TimeUnit.HOURS.toMillis(1)).limit(10),
FAIL_ON_CONFLICT,
() -> completeLedgerInfoForOffloaded(ledgerId, uuid),
scheduledExecutor, name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public static CompletableFuture<Void> cleanupOffloaded(long ledgerId, UUID uuid,
metadataMap.put("ManagedLedgerName", name);

return Retries.run(Backoff.exponentialJittered(TimeUnit.SECONDS.toMillis(1),
TimeUnit.SECONDS.toHours(1)).limit(10),
TimeUnit.HOURS.toMillis(1)).limit(10),
Retries.NonFatalPredicate,
() -> mlConfig.getLedgerOffloader().deleteOffloaded(ledgerId, uuid, metadataMap),
executor, name).whenComplete((ignored, exception) -> {
Expand Down

0 comments on commit 11eee3c

Please sign in to comment.