You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "EdColeman (via GitHub)" <gi...@apache.org> on 2023/04/06 21:31:53 UTC

[GitHub] [accumulo] EdColeman commented on a diff in pull request #3278: remove unnecessary synchronization

EdColeman commented on code in PR #3278:
URL: https://github.com/apache/accumulo/pull/3278#discussion_r1160275112


##########
server/tserver/src/main/java/org/apache/accumulo/tserver/log/LogSorter.java:
##########
@@ -61,8 +61,8 @@ public class LogSorter {
   VolumeManager fs;
   AccumuloConfiguration conf;
 
-  private final Map<String,LogProcessor> currentWork =
-      Collections.synchronizedMap(new HashMap<String,LogProcessor>());
+  // access must synchronize on currentWork to guard against concurrent updates
+  private final Map<String,LogProcessor> currentWork = new HashMap<>();

Review Comment:
   I set the base to 3.0 - we could included it in 2.1.1, but it seems that would have the same objection.



-- 
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: notifications-unsubscribe@accumulo.apache.org

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