You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2020/11/06 01:09:10 UTC

[GitHub] [accumulo] keith-turner commented on a change in pull request #1710: WIP #873 Remove Sync and added StripedLock

keith-turner commented on a change in pull request #1710:
URL: https://github.com/apache/accumulo/pull/1710#discussion_r518464277



##########
File path: server/base/src/main/java/org/apache/accumulo/server/zookeeper/TransactionWatcher.java
##########
@@ -25,7 +25,9 @@
 import java.util.Set;
 import java.util.concurrent.Callable;
 import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.Lock;
 
+import com.google.common.util.concurrent.Striped;

Review comment:
       I would avoid Guava striped locks because its beta.  I have used this pattern w/o Guava using an array of locks like : 
   
   https://github.com/apache/accumulo/blob/46ee51d0c6afe9910873f55653017b91c45a345a/core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/SynchronousLoadingBlockCache.java#L38




----------------------------------------------------------------
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:
users@infra.apache.org