[ARIES-1714] fastbin long running (future) calls sometimes fail set the pool evict size to 0 for long running async calls
Project: http://git-wip-us.apache.org/repos/asf/aries-rsa/repo Commit: http://git-wip-us.apache.org/repos/asf/aries-rsa/commit/1009ba59 Tree: http://git-wip-us.apache.org/repos/asf/aries-rsa/tree/1009ba59 Diff: http://git-wip-us.apache.org/repos/asf/aries-rsa/diff/1009ba59 Branch: refs/heads/master Commit: 1009ba59f7a77a6309f95de993c7b85c6e6129a9 Parents: 33b1e4d Author: Johannes Utzig <[email protected]> Authored: Tue Feb 21 16:28:57 2017 +0100 Committer: Johannes Utzig <[email protected]> Committed: Tue Apr 11 13:05:07 2017 +0200 ---------------------------------------------------------------------- .../aries/rsa/provider/fastbin/tcp/ClientInvokerImpl.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/1009ba59/provider/fastbin/src/main/java/org/apache/aries/rsa/provider/fastbin/tcp/ClientInvokerImpl.java ---------------------------------------------------------------------- diff --git a/provider/fastbin/src/main/java/org/apache/aries/rsa/provider/fastbin/tcp/ClientInvokerImpl.java b/provider/fastbin/src/main/java/org/apache/aries/rsa/provider/fastbin/tcp/ClientInvokerImpl.java index ba0a12b..191a896 100644 --- a/provider/fastbin/src/main/java/org/apache/aries/rsa/provider/fastbin/tcp/ClientInvokerImpl.java +++ b/provider/fastbin/src/main/java/org/apache/aries/rsa/provider/fastbin/tcp/ClientInvokerImpl.java @@ -323,7 +323,13 @@ public class ClientInvokerImpl implements ClientInvoker, Dispatched { protected class InvokerTransportPool extends TransportPool { public InvokerTransportPool(String uri, DispatchQueue queue) { - super(uri, queue, TransportPool.DEFAULT_POOL_SIZE, timeout << 1); + /* + * the evict time needs to be 0. Otherwise the client will + * evict transport objects which breaks the connection for + * long running async calls. + * Since there is limit of 2 transports per uri it shouldn't be that many objects + */ + super(uri, queue, TransportPool.DEFAULT_POOL_SIZE, 0); } @Override
