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

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

                Author: ASF GitHub Bot
            Created on: 29/Aug/24 19:03
            Start Date: 29/Aug/24 19:03
    Worklog Time Spent: 10m 
      Work Description: phet commented on code in PR #4038:
URL: https://github.com/apache/gobblin/pull/4038#discussion_r1736948757


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/proc/ReevaluateDagProc.java:
##########
@@ -81,6 +81,11 @@ protected void act(DagManagementStateStore 
dagManagementStateStore, Pair<Optiona
 
     JobStatus jobStatus = dagNodeWithJobStatus.getRight().get();
     ExecutionStatus executionStatus = 
ExecutionStatus.valueOf(jobStatus.getEventName());
+    // get the dag before updating dag node's status because after updating 
status, dag may be considered "complete" and
+    // may get cleaned up by other Reevaluate DagProc
+    Dag<JobExecutionPlan> dag = 
dagManagementStateStore.getDag(getDagId()).get();
+    dag.getNodes().stream().filter(node -> 
node.getValue().getId().equals(getDagNodeId())).findFirst().get().getValue()

Review Comment:
   would it be worth a check here that `findFirst()` did actually match this 
dagNodeId?  that would be far clearer in the logs than the resulting 
exception's error message if the optional were not actually present





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

    Worklog Id:     (was: 932481)
    Time Spent: 40m  (was: 0.5h)

> handle concurrent ReevaluateDagProc for cancelled dag nodes correctly
> ---------------------------------------------------------------------
>
>                 Key: GOBBLIN-2143
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-2143
>             Project: Apache Gobblin
>          Issue Type: Bug
>            Reporter: Arjun Singh Bora
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>




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

Reply via email to