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/15 16:29:00 UTC

[GitHub] [gobblin] aplex commented on a change in pull request #3312: [GOBBLIN-1473] Fix ConcurrentModificationException when handling leadership change

aplex commented on a change in pull request #3312:
URL: https://github.com/apache/gobblin/pull/3312#discussion_r651958894



##########
File path: gobblin-service/src/main/java/org/apache/gobblin/service/modules/scheduler/GobblinServiceJobScheduler.java
##########
@@ -165,8 +165,9 @@ public void run() {
     } else {
       // Since we are going to change status to isActive=false, unschedule all flows
       for (Spec spec : this.scheduledFlowSpecs.values()) {
-        onDeleteSpec(spec.getUri(), spec.getVersion());
+        onDeleteSpec(spec.getUri(), spec.getVersion(), new Properties(), false);

Review comment:
       Can we clone the values list instead? Then we will iterate on a copy of it that would not change when we remove entries from the map.
   
   Overload with "removeFromMap" looks a bit strange, and future maintainers will have to spend some brain cycles to understand why it was added.




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