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

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

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


##########
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:
   Unless we're fixing a bug, I'd rather not risk introducing a new bug in 1.10 by changing concurrency assumptions in a patch release. Is this actually a bug, or just unneeded? I don't think it's a performance issue in here.



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