accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [accumulo] keith-turner commented on a change in pull request #1199: Fix #1122 Added concurrent structures to ThriftTransportPool
Date Mon, 01 Jul 2019 16:57:52 GMT
keith-turner commented on a change in pull request #1199: Fix #1122 Added concurrent structures
to ThriftTransportPool
URL: https://github.com/apache/accumulo/pull/1199#discussion_r299128971
 
 

 ##########
 File path: core/src/main/java/org/apache/accumulo/core/clientImpl/ThriftTransportPool.java
 ##########
 @@ -49,28 +50,28 @@
   private long killTime = 1000 * 3;
 
   private static class CachedConnections {
-    LinkedList<CachedConnection> unreserved = new LinkedList<>();
-    Map<CachedTTransport,CachedConnection> reserved = new HashMap<>();
+    Deque<CachedConnection> unreserved = new LinkedBlockingDeque<>(); // stack
- LIFO
 
 Review comment:
   Since all access to this is in sync block, could use an ArrayDeque.  The array will have
much better performance than a linked list, and it does not doing any sync which also improves
performance.

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


With regards,
Apache Git Services

Mime
View raw message