Skip to content
Draft
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 @@ -748,11 +748,33 @@ public void deletePipeline(JobRunId pipelineRunId, boolean force)
}
}

deleteAll(JobRecord.DATA_STORE_KIND, pipelineKey);
deleteAll(Slot.DATA_STORE_KIND, pipelineKey);
deleteAll(ShardedValue.DATA_STORE_KIND, pipelineKey);
deleteAll(Barrier.DATA_STORE_KIND, pipelineKey);
deleteAll(JobInstanceRecord.DATA_STORE_KIND, pipelineKey);
deleteAll(FanoutTaskRecord.DATA_STORE_KIND, pipelineKey);
List<String> kindsToDelete = Arrays.asList(
JobRecord.DATA_STORE_KIND,
Slot.DATA_STORE_KIND,
ShardedValue.DATA_STORE_KIND,
Barrier.DATA_STORE_KIND,
JobInstanceRecord.DATA_STORE_KIND,
ExceptionRecord.DATA_STORE_KIND
Copy link

Copilot AI Apr 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The updated deletion list replaces FanoutTaskRecord with ExceptionRecord. Confirm whether this change is intentional or if FanoutTaskRecord should also be deleted.

Suggested change
ExceptionRecord.DATA_STORE_KIND
ExceptionRecord.DATA_STORE_KIND,
FanoutTaskRecord.DATA_STORE_KIND

Copilot uses AI. Check for mistakes.
);

kindsToDelete.parallelStream()
.forEach(kind -> deleteAll(kind, pipelineKey));
}

private <R> R attemptWithRetries(Retryer<R> retryer, final Operation<R> operation) {
try {
return retryer.call(operation);
} catch (ExecutionException e) {
log.log(Level.WARNING, "Non-retryable exception during " + operation.getName(), e.getCause());
throw new RuntimeException(e.getCause());
} catch (RetryException e) {
if (e.getCause() instanceof RuntimeException) {
log.warning(e.getCause().getMessage() + " during " + operation.getName()
+ " throwing after 5 multiple attempts ");
throw (RuntimeException) e.getCause();
} else {
throw new RuntimeException(e);
}
}
}
}
Loading