ACCUMULO-3574 Prevent cached connection being returned when not requested.
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/bd981c88 Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/bd981c88 Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/bd981c88 Branch: refs/heads/1.6 Commit: bd981c88654458bba41e754d861173533560294e Parents: e5086f9 Author: Josh Elser <els...@apache.org> Authored: Thu Feb 12 19:16:47 2015 -0500 Committer: Josh Elser <els...@apache.org> Committed: Thu Feb 12 19:16:47 2015 -0500 ---------------------------------------------------------------------- .../org/apache/accumulo/core/client/impl/ThriftTransportPool.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/accumulo/blob/bd981c88/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java b/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java index a6e3a8c..4914261 100644 --- a/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java +++ b/core/src/main/java/org/apache/accumulo/core/client/impl/ThriftTransportPool.java @@ -440,7 +440,7 @@ public class ThriftTransportPool { int index = random.nextInt(servers.size()); ThriftTransportKey ttk = servers.get(index); - if (!preferCachedConnection) { + if (preferCachedConnection) { synchronized (this) { List<CachedConnection> cachedConnList = getCache().get(ttk); if (cachedConnList != null) {