umustafi commented on code in PR #4008:
URL: https://github.com/apache/gobblin/pull/4008#discussion_r1688255559
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/DagProcUtils.java:
##########
@@ -193,15 +194,33 @@ public static void sendCancellationEvent(JobExecutionPlan
jobExecutionPlan) {
private static void
sendEnforceJobStartDeadlineDagAction(DagManagementStateStore
dagManagementStateStore, Dag.DagNode<JobExecutionPlan> dagNode)
throws IOException {
- dagManagementStateStore.addJobDagAction(dagNode.getValue().getFlowGroup(),
dagNode.getValue().getFlowName(),
- dagNode.getValue().getFlowExecutionId(),
dagNode.getValue().getJobName(),
+ DagActionStore.DagAction dagAction = new
DagActionStore.DagAction(dagNode.getValue().getFlowGroup(),
+ dagNode.getValue().getFlowName(),
dagNode.getValue().getFlowExecutionId(), dagNode.getValue().getJobName(),
DagActionStore.DagActionType.ENFORCE_JOB_START_DEADLINE);
+ try {
+ dagManagementStateStore.addDagAction(dagAction);
+ } catch (IOException e) {
+ if (e.getCause() != null && e.getCause() instanceof
SQLIntegrityConstraintViolationException) {
+ dagManagementStateStore.deleteDagAction(dagAction);
Review Comment:
why delete then re-add? is this to trigger CDC again?
--
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]