phet commented on code in PR #3800:
URL: https://github.com/apache/gobblin/pull/3800#discussion_r1362157216


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerHandler.java:
##########
@@ -150,7 +150,8 @@ private boolean 
persistFlowAction(MultiActiveLeaseArbiter.LeaseObtainedStatus le
     if (this.dagActionStore.isPresent() && 
this.multiActiveLeaseArbiter.isPresent()) {
       try {
         DagActionStore.DagAction flowAction = leaseStatus.getFlowAction();
-        this.dagActionStore.get().addDagAction(flowAction.getFlowGroup(), 
flowAction.getFlowName(), flowAction.getFlowExecutionId(), 
flowAction.getFlowActionType());
+        // Replace flow execution id with trigger timestamp to easily track 
the flow
+        this.dagActionStore.get().addDagAction(flowAction.getFlowGroup(), 
flowAction.getFlowName(), String.valueOf(leaseStatus.getEventTimestamp()), 
flowAction.getFlowActionType());

Review Comment:
   seems confusing that 
`LeaseObtainedStatus.getFlowAction().getFlowExecutionId()` returns a different 
value than what we're storing in the `DagAction.getFlowExecutionId()`.  e.g. 
why not unify them by *encapsulating* the switcheroo to 
`LeaseObtainedStatus.getEventTimestamp()` inside the 
`LeaseObtainedStatus.getFlowAction()` call?
   
   then, in that location I suggest a code comment explaining why it's helpful 
and safe to replace the original value w/ this one.



-- 
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]

Reply via email to