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


##########
gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/MostlyMySqlDagManagementStateStore.java:
##########
@@ -122,33 +125,36 @@ public Set<String> getFailedDagIds() throws IOException {
   }
 
   @Override
+  // todo - updating different mapps here and in addDagNodeState can result in 
inconsistency between the maps
   public synchronized void deleteDagNodeState(DagManager.DagId dagId, 
Dag.DagNode<JobExecutionPlan> dagNode) {
-    String dagIdStr = dagId.toString();
     this.jobToDag.remove(dagNode);
     this.dagNodes.remove(dagNode.getValue().getId());
-    this.dagToDeadline.remove(dagIdStr);
-    this.dagToJobs.get(dagIdStr).remove(dagNode);
-    if (this.dagToJobs.get(dagIdStr).isEmpty()) {
-      this.dagToJobs.remove(dagIdStr);
+    this.dagToDeadline.remove(dagId);
+    this.dagToJobs.get(dagId).remove(dagNode);
+    if (this.dagToJobs.get(dagId).isEmpty()) {
+      this.dagToJobs.remove(dagId);
     }
   }
 
+  // todo - updating different mapps here and in deleteDagNodeState can result 
in inconsistency between the maps

Review Comment:
   I don't believe there's concern, since both methods are `synchronized`.  in 
fact, there's not need for CHM, since method-level synchronization



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