[
https://issues.apache.org/jira/browse/GOBBLIN-1988?focusedWorklogId=900269&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-900269
]
ASF GitHub Bot logged work on GOBBLIN-1988:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 18/Jan/24 01:37
Start Date: 18/Jan/24 01:37
Worklog Time Spent: 10m
Work Description: AndyJiang99 commented on code in PR #3862:
URL: https://github.com/apache/gobblin/pull/3862#discussion_r1456712626
##########
gobblin-utility/src/main/java/org/apache/gobblin/util/LoggingUncaughtExceptionHandler.java:
##########
@@ -42,6 +45,7 @@ public LoggingUncaughtExceptionHandler(Optional<Logger>
logger) {
@Override
public void uncaughtException(Thread t, Throwable e) {
+ exception = e;
Review Comment:
The exception variable is set but never used, maybe missing something?
##########
gobblin-runtime/src/main/java/org/apache/gobblin/runtime/StreamModelTaskRunner.java:
##########
@@ -155,13 +156,17 @@ protected void run() throws Exception {
Thread thread = new Thread(() -> connectableStream.connect());
thread.setName(this.getClass().getSimpleName());
//Log uncaught exceptions (e.g.OOMEs) to prevent threads from dying
silently
- thread.setUncaughtExceptionHandler(new
LoggingUncaughtExceptionHandler(Optional.absent()));
+ LoggingUncaughtExceptionHandler exceptionHandler = new
LoggingUncaughtExceptionHandler(Optional.absent());
+ thread.setUncaughtExceptionHandler(exceptionHandler);
thread.start();
-
- if (!ExponentialBackoff.awaitCondition().callable(() ->
this.forks.keySet().stream().map(Optional::get).allMatch(Fork::isDone)).
+ if (!ExponentialBackoff.awaitCondition().callable(() ->
+ this.forks.keySet().stream().map(Optional::get).allMatch(Fork::isDone)
|| exceptionHandler.getException() != null).
initialDelay(initialDelay).maxDelay(initialDelay).maxWait(TimeUnit.MINUTES.toMillis(maxWaitInMinute)).await())
{
throw new TimeoutException("Forks did not finish withing specified
timeout.");
}
+ if (exceptionHandler.getException() != null) {
+ throw Throwables.propagate(exceptionHandler.getException());
+ }
Review Comment:
You mentioned a mock to test this functionality to fail the container and
retry the job again, but I don't see the rests associated with that
Issue Time Tracking
-------------------
Worklog Id: (was: 900269)
Time Spent: 0.5h (was: 20m)
> Fail the streaming container when OOM issue happens
> ---------------------------------------------------
>
> Key: GOBBLIN-1988
> URL: https://issues.apache.org/jira/browse/GOBBLIN-1988
> Project: Apache Gobblin
> Issue Type: Bug
> Reporter: Zihan Li
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Now when the OOM error happens, we just log out the error and keep the
> container running there without doing anything. In this case we should fail
> the container and retry the task.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)