[ 
https://issues.apache.org/jira/browse/GOBBLIN-2017?focusedWorklogId=922625&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-922625
 ]

ASF GitHub Bot logged work on GOBBLIN-2017:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Jun/24 18:03
            Start Date: 07/Jun/24 18:03
    Worklog Time Spent: 10m 
      Work Description: phet commented on code in PR #3965:
URL: https://github.com/apache/gobblin/pull/3965#discussion_r1631514247


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/ReevaluateDagProc.java:
##########
@@ -89,11 +86,29 @@ protected void act(DagManagementStateStore 
dagManagementStateStore, Pair<Optiona
       return;
     }
 
+    if (dagNodeWithJobStatus.getRight().isPresent()
+        && 
!FlowStatusGenerator.FINISHED_STATUSES.contains(dagNodeWithJobStatus.getRight().get().getEventName()))
 {
+      // this may happen if adding job status in the store failed after adding 
a ReevaluateDagAction in KafkaJobStatusMonitor
+      throw new RuntimeException(String.format("Job status for dagNode %s is 
%s. Re-evaluate dag action are created for"
+              + " new jobs with no job status when there are multiple of them 
to run next; or when a job finishes with status - %s",
+          dagNodeId, dagNodeWithJobStatus.getRight().get().getEventName(), 
FlowStatusGenerator.FINISHED_STATUSES));
+    }
+
     Dag.DagNode<JobExecutionPlan> dagNode = 
dagNodeWithJobStatus.getLeft().get();
+
+    if (!dagNodeWithJobStatus.getRight().isPresent()) {
+      // if the job status is not present, this job was never launched, submit 
it now
+      submitJobForThisDagNode(dagManagementStateStore, dagNode);
+      return;
+    }

Review Comment:
   it may be too subtle (and even potentially mask errors) to designate that a 
REEVALUATE DagAction with no job status actually happens to encode the need to 
launch the job.
   
   to step back for a moment: direct recursive handling would merely decompose 
multi-job LAUNCH into multiple LAUNCH DagActions and multi-job REEVALUATE into 
multiple REEVALUATE DagActions.  why not transparently handle the multi-job 
cases in this way, rather than pressing REEVALUATE into service for 
multi-LAUNCH?





Issue Time Tracking
-------------------

    Worklog Id:     (was: 922625)
    Time Spent: 1h 50m  (was: 1h 40m)

> divide multiple job launches in a LaunchDagProc into multiple LaunchDagActions
> ------------------------------------------------------------------------------
>
>                 Key: GOBBLIN-2017
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2017
>             Project: Apache Gobblin
>          Issue Type: Task
>            Reporter: Arjun Singh Bora
>            Priority: Major
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> divide multiple job launches in a LaunchDagProc into multiple 
> LaunchDagActions for two reasons
> 1) it will then spend less time in each dag proc processing and have more 
> chance to complete the operation in the lease time
> 2) handling partial job submissions in one LaunchDagProc sending N jobs is 
> difficult



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to