PDGGK commented on PR #37342: URL: https://github.com/apache/beam/pull/37342#issuecomment-3940424948
Thanks for the questions @kennknowles! **Who is doing the retrying?** Retrying happens inside RRIO, in `Repeater.apply()` — not by the runner. `Repeater` catches `UserCodeExecutionException` and calls `e.shouldRepeat()` to decide whether to retry. The three subclasses (`UserCodeQuotaException`, `UserCodeTimeoutException`, `UserCodeRemoteSystemException`) override `shouldRepeat()` to return `true`, while the base class returns `false`. The bug is that `parseAndThrow` only preserved `UserCodeQuotaException` when unwrapping `ExecutionException` from `Future.get()`. The other two retryable types were being re-wrapped as base `UserCodeExecutionException`, which made `shouldRepeat()` return `false` — silently skipping retries for timeout and remote system errors. **Traversing the full causal chain** You're right — that's unnecessarily complex. `Future.get()` adds exactly one `ExecutionException` wrapper, so inspecting `e.getCause()` is sufficient. I'll simplify `parseAndThrow` to: if the cause is already a `UserCodeExecutionException` (or subclass), rethrow it directly; otherwise wrap it once. This is simpler and automatically handles any future subclasses. Pushing the simplified version now. -- 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]
