[
https://issues.apache.org/jira/browse/GOBBLIN-2073?focusedWorklogId=921352&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-921352
]
ASF GitHub Bot logged work on GOBBLIN-2073:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 30/May/24 08:37
Start Date: 30/May/24 08:37
Worklog Time Spent: 10m
Work Description: phet commented on code in PR #3952:
URL: https://github.com/apache/gobblin/pull/3952#discussion_r1620226064
##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/MysqlMultiActiveLeaseArbiter.java:
##########
@@ -305,24 +306,26 @@ public LeaseAttemptStatus
tryAcquireLease(DagActionStore.DagAction dagAction, lo
DagActionStore.DagAction updatedDagAction =
adoptConsensusFlowExecutionId ?
dagAction.updateFlowExecutionId(dbEventTimestamp.getTime()) : dagAction;
log.debug("tryAcquireLease for [{}, is: {}, eventTimestamp: {}] -
CASE 2: Same event, lease is valid",
- updatedDagAction, isReminderEvent ? "reminder" : "original",
dbCurrentTimestamp.getTime());
+ updatedDagAction, dagAction.isReminder ? "reminder" :
"original", dbCurrentTimestamp.getTime());
// Utilize db timestamp for reminder
- return new
LeaseAttemptStatus.LeasedToAnotherStatus(updatedDagAction,
dbEventTimestamp.getTime(),
+ updatedDagAction.setEventTimeMillis(dbEventTimestamp.getTime());
Review Comment:
I see this being updated, but unless I missed something critical, it won't
actually be durably persisted to the DB, will it?
`DagAction` is meant for sharing between the various distributed hosts. in
most every distributed sharing situation, mutability is at best challenging,
and at worst a tragic entrapment into error. therefore I DON'T SUGGEST to
durably persist the event time. immutability should be our standard technique.
where there's a need for additional local-to-each-host info, just compose
around `DagAction`. e.g.:
```
@Data
class ThisHostDagActionReflection {
private final DagAction dagAction;
private final long timestampMillis;
}
```
[yikes! crappy name... sorry]
Issue Time Tracking
-------------------
Worklog Id: (was: 921352)
Time Spent: 1h 10m (was: 1h)
> Add eventTime and reminder fields to DagAction POJO
> ---------------------------------------------------
>
> Key: GOBBLIN-2073
> URL: https://issues.apache.org/jira/browse/GOBBLIN-2073
> Project: Apache Gobblin
> Issue Type: Bug
> Components: gobblin-service
> Reporter: Urmi Mustafi
> Assignee: Abhishek Tiwari
> Priority: Major
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> An event timestamp and reminder flag are used in conjunction with DagActions
> for lease arbitration and for reminder dagActions. It makes sense to include
> these fields in the DagAction object itself to easily transfer the
> information from one location to another. In particular for reminder events
> used to check back in on incomplete dagAction leases, these two fields are
> utilized and it's easiest to keep track of them when it's maintained within
> the consensusDagAction returned in a LeaseAttemptStatus
--
This message was sent by Atlassian Jira
(v8.20.10#820010)