You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gobblin.apache.org by GitBox <gi...@apache.org> on 2021/06/23 17:42:15 UTC

[GitHub] [gobblin] arjun4084346 commented on a change in pull request #3318: [GOBBLIN-1478] Fix concurrency issue when iterating failedDagIds

arjun4084346 commented on a change in pull request #3318:
URL: https://github.com/apache/gobblin/pull/3318#discussion_r657327595



##########
File path: gobblin-service/src/main/java/org/apache/gobblin/service/modules/orchestration/DagManager.java
##########
@@ -1275,20 +1275,18 @@ public void run() {
       try {
         log.info("Cleaning failed dag state store");
         long startTime = System.currentTimeMillis();
-        List<String> dagIdsToClean = new ArrayList<>();
+        int numCleaned = 0;
 
-        for (String dagId : this.failedDagIds) {
+        Set<String> failedDagIdsCopy = new HashSet<>(this.failedDagIds);

Review comment:
       as per the [doc](https://docs.oracle.com/javase/7/docs/api/java/util/Collections.html#synchronizedSet(java.util.Set)) , `synchronized` could have been used.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org