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

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

                Author: ASF GitHub Bot
            Created on: 15/Jun/21 16:29
            Start Date: 15/Jun/21 16:29
    Worklog Time Spent: 10m 
      Work Description: 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:
[email protected]


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

    Worklog Id:     (was: 611439)
    Time Spent: 20m  (was: 10m)

> Fix ConcurrentModificationException when handling leadership change
> -------------------------------------------------------------------
>
>                 Key: GOBBLIN-1473
>                 URL: https://issues.apache.org/jira/browse/GOBBLIN-1473
>             Project: Apache Gobblin
>          Issue Type: Bug
>            Reporter: Jack Moseley
>            Priority: Major
>          Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to