meszibalu opened a new pull request #2685: URL: https://github.com/apache/hbase/pull/2685
* PoolMap does not discard any elements anymore. If an element is put, it always stores it. The reason: it stores expensive resources (rpc connections) which would lead to resource leak if we simple discard it. RpcClients can reference netty ByteBufs which are reference counted. Resource cleanup is done by AbstractRpcClient.cleanupIdleConnections(). * Removed concurrency from PoolMap. It is called only from AbstractRpcClient in synchronized blocks, so it doesn't have to be thread-safe. * Max size is a hint for RoundRobinPool. Until maxSize is not reached, it will force users to create new resources. So it works the same as before, but it does not prevent putting more elements then maxSize. * ThreadLocalPool doesn't uses ThreadLocal class anymore. It stores resources on thread basis, but it doesn't remove values when a thread exits. Again, proper cleanup is done by cleanupIdleConnections(). ---------------------------------------------------------------- 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: [email protected]
