arunpandianp commented on code in PR #38919:
URL: https://github.com/apache/beam/pull/38919#discussion_r3648923381
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/work/processing/failures/WorkFailureProcessor.java:
##########
@@ -99,28 +98,41 @@ private static boolean isOutOfMemoryError(@Nullable
Throwable t) {
return false;
}
- /**
- * Processes failures caused by thrown exceptions that occur during
execution of {@link Work}. May
- * attempt to retry execution of the {@link Work} or drop it if it is
invalid.
- */
- public void logAndProcessFailure(
+ public void logAndProcessFailureBatch(
String computationId,
- ExecutableWork executableWork,
+ List<ExecutableWork> executableWorks,
Throwable t,
Consumer<Work> onInvalidWork)
throws Throwable {
- switch (evaluateRetry(computationId, executableWork.work(), t)) {
- case DO_NOT_RETRY:
- // Consider the item invalid. It will eventually be retried by
Windmill if it still needs to
- // be processed.
- onInvalidWork.accept(executableWork.work());
- break;
- case RETRY_LOCALLY:
- // Try again after some delay and at the end of the queue to avoid a
tight loop.
- executeWithDelay(retryLocallyDelayMs, executableWork);
- break;
- case RETHROW_THROWABLE:
- throw t;
+ List<ExecutableWork> worksToRetryLocally = new java.util.ArrayList<>();
+
+ for (ExecutableWork executableWork : executableWorks) {
+ switch (evaluateRetry(computationId, executableWork.work(), t)) {
+ case DO_NOT_RETRY:
+ // Consider the item invalid. It will eventually be retried by
Windmill if it still needs
+ // to
Review Comment:
done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]