exceptionfactory commented on a change in pull request #5390:
URL: https://github.com/apache/nifi/pull/5390#discussion_r708613114



##########
File path: 
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/leader/election/CuratorLeaderElectionManager.java
##########
@@ -64,10 +64,10 @@
 
     private volatile boolean stopped = true;
 
-    private final Map<String, LeaderRole> leaderRoles = new HashMap<>();
-    private final Map<String, RegisteredRole> registeredRoles = new 
HashMap<>();
+    private final ConcurrentMap<String, LeaderRole> leaderRoles = new 
ConcurrentHashMap<>();
+    private final ConcurrentMap<String, RegisteredRole> registeredRoles = new 
ConcurrentHashMap<>();
 
-    private final Map<String, TimedBuffer<TimestampedLong>> leaderChanges = 
new HashMap<>();
+    private final ConcurrentMap<String, TimedBuffer<TimestampedLong>> 
leaderChanges = new ConcurrentHashMap<>();

Review comment:
       Thanks for the reply @markap14, that's fair, especially given the use 
case and associated issue. I'm fine with leaving it as it stands, but 
appreciate the consideration.




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