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

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

                Author: ASF GitHub Bot
            Created on: 03/Feb/23 21:54
            Start Date: 03/Feb/23 21:54
    Worklog Time Spent: 10m 
      Work Description: ZihanLi58 commented on code in PR #3635:
URL: https://github.com/apache/gobblin/pull/3635#discussion_r1096318428


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java:
##########
@@ -272,6 +275,9 @@ protected void startUp() {
    * @param setStatus if true, set all jobs in the dag to pending
    */
   synchronized void addDag(Dag<JobExecutionPlan> dag, boolean persist, boolean 
setStatus) throws IOException {
+    if (!this.isActive) {
+      return;
+    }

Review Comment:
   Oh good catch, I add the check in the load dag method to avoid this 
scenario. 





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

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

> Add house keeping thread in DagManager to periodically sync in memory state 
> with mysql table 
> ---------------------------------------------------------------------------------------------
>
>                 Key: GOBBLIN-1778
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1778
>             Project: Apache Gobblin
>          Issue Type: Improvement
>            Reporter: Zihan Li
>            Priority: Major
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Now dag managers have the assumption that it is the only process that can 
> update mysql table and the in-memory state is always in sync with mysql. But 
> we do notice that during the leader transforms period, it's possible that two 
> dag manager can run concurrently and update the mysql db at the same time. 
> To address that, we need either add a lock to make sure only one dag manager 
> is working at one time, or we need to have a housekeeping thread to 
> periodically sync the in-memory state with the mysql table. After discussion, 
> we choose to go with later approach



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

Reply via email to