Skip to content

Commit 60a9d31

Browse files
authored
DagProcessingThread bug fix (#4109)
* DagProcessingThread bug fix and enhance logging --------- Co-authored-by: Vaibhav Singhal
1 parent a978b29 commit 60a9d31

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

  • gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/task

gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/task/DagTask.java

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,15 @@ public boolean conclude() {
6565
boolean completedLease = this.leaseObtainedStatus.completeLease();
6666
this.dagProcEngineMetrics.markDagActionsConclude(this.dagAction.getDagActionType(), completedLease);
6767
return completedLease;
68-
} catch (IOException e) {
69-
this.dagProcEngineMetrics.markDagActionsConclude(this.dagAction.getDagActionType(), false);
68+
} catch (Exception e) {
69+
try {
70+
this.dagProcEngineMetrics.markDagActionsConclude(this.dagAction.getDagActionType(), false);
71+
} catch(Exception ex){
72+
log.error("Exception encountered in emitting metrics for dag node ID: {}, dag action type: {}. Stacktrace: ", dagAction.getDagNodeId(), dagAction.getDagActionType(), ex);
73+
}
7074
// TODO: Decide appropriate exception to throw and add to the commit method's signature
71-
throw new RuntimeException(e);
75+
log.error("Exception encountered in processing this DagTask, for dag node ID: {}, dag action type: {}. Stacktrace: ", dagAction.getDagNodeId(), dagAction.getDagActionType(), e);
76+
return false;
7277
}
7378
}
7479
}

0 commit comments

Comments
 (0)