You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/11/03 05:48:49 UTC

[GitHub] [shardingsphere] TeslaCN commented on a diff in pull request #21919: Use ConcurrentHashMap to instead of sync in DistributedLockHolder

TeslaCN commented on code in PR #21919:
URL: https://github.com/apache/shardingsphere/pull/21919#discussion_r1012520341


##########
mode/type/cluster/repository/api/src/main/java/org/apache/shardingsphere/mode/repository/cluster/lock/holder/DistributedLockHolder.java:
##########
@@ -33,14 +35,14 @@ public final class DistributedLockHolder {
     
     private final TypedProperties<?> props;
     
-    private final Map<String, DistributedLock> locks;
+    private final ConcurrentHashMap<String, DistributedLock> locks;

Review Comment:
   Should we use `ConcurrentMap` or `Map` 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@shardingsphere.apache.org

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