Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tiered Storage] Add logs for cleanup offloaded data operation #9852

Merged
merged 3 commits into from
Mar 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2764,6 +2764,8 @@ private void offloadLoop(CompletableFuture<PositionImpl> promise, Queue<LedgerIn
scheduledExecutor, name)
.whenComplete((ignore2, exception) -> {
if (exception != null) {
log.error("[{}] Failed to offload data for the ledgerId {}",
name, ledgerId, exception);
cleanupOffloaded(
ledgerId, uuid,
driverName, driverMetadata,
Expand Down Expand Up @@ -2954,13 +2956,15 @@ private void cleanupOffloaded(long ledgerId, UUID uuid, String offloadDriverName
* identify offloader
*/
Map<String, String> offloadDriverMetadata, String cleanupReason) {
log.info("[{}] Cleanup offload for ledgerId {} uuid {} because of the reason {}.",
name, ledgerId, uuid.toString(), cleanupReason);
Retries.run(Backoff.exponentialJittered(TimeUnit.SECONDS.toMillis(1), TimeUnit.SECONDS.toHours(1)).limit(10),
Retries.NonFatalPredicate,
() -> config.getLedgerOffloader().deleteOffloaded(ledgerId, uuid, offloadDriverMetadata),
scheduledExecutor, name).whenComplete((ignored, exception) -> {
if (exception != null) {
log.warn("Error cleaning up offload for {}, (cleanup reason: {})", ledgerId, cleanupReason,
exception);
log.warn("[{}] Error cleaning up offload for {}, (cleanup reason: {})",
name, ledgerId, cleanupReason, exception);
}
});
}
Expand Down