phet commented on code in PR #3890:
URL: https://github.com/apache/gobblin/pull/3890#discussion_r1522526414
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/FlowTriggerDecorator.java:
##########
@@ -116,54 +100,41 @@ public FlowTriggerHandler(Config config,
Optional<MultiActiveLeaseArbiter> lease
* @throws IOException
*/
public void handleTriggerEvent(Properties jobProps, DagActionStore.DagAction
flowAction, long eventTimeMillis,
- boolean isReminderEvent, boolean skipFlowExecutionIdReplacement) throws
IOException {
- if (multiActiveLeaseArbiter.isPresent()) {
- MultiActiveLeaseArbiter.LeaseAttemptStatus leaseAttemptStatus =
multiActiveLeaseArbiter.get().tryAcquireLease(
- flowAction, eventTimeMillis, isReminderEvent,
skipFlowExecutionIdReplacement);
- // The flow action contained in the`LeaseAttemptStatus` from the lease
arbiter contains an updated flow execution
- // id. From this point onwards, always use the newer version of the flow
action to easily track the action through
- // orchestration and execution.
+ boolean isReminderEvent, boolean skipFlowExecutionIdReplacement)
+ throws IOException {
+
+ try {
+ LeaseAttemptStatus leaseAttemptStatus = null;
+ leaseAttemptStatus =
+ this.tryAcquireLease(flowAction, eventTimeMillis, isReminderEvent,
skipFlowExecutionIdReplacement);
if (leaseAttemptStatus instanceof
MultiActiveLeaseArbiter.LeaseObtainedStatus) {
- if (isReminderEvent) {
- this.leasesObtainedDueToReminderCount.mark();
+ MultiActiveLeaseArbiter.LeaseObtainedStatus leaseObtainedStatus =
(MultiActiveLeaseArbiter.LeaseObtainedStatus)
+ leaseAttemptStatus;
+ if (persistFlowAction(leaseObtainedStatus)) {
Review Comment:
I believe at one point, originally, this terminology of "flow action" made
sense to me, but as we've gone on to define a bevy of new actions pretty
exclusively around the name `DagAction`, I'm left to wonder:
* what is a "flow action"?
* how is it different from a DagAction?
* could the two concepts be consolidated into one, to also unify the
naming/terminology?
--
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]