You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The source: @Override public E get(final long timeout, final TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException { for (;;) { **synchronized (this) {** try { final E entry = entryRef.get(); if (entry != null) { return entry; } if (done.get()) { throw new ExecutionException(operationAborted()); } final E leasedEntry = getPoolEntryBlocking(route, state, timeout, timeUnit, this); if (validateAfterInactivity > 0) { if (leasedEntry.getUpdated() + validateAfterInactivity <= System.currentTimeMillis()) { if (!validate(leasedEntry)) { leasedEntry.close(); release(leasedEntry, false); continue; } } }
Solution:
The Encryption SDK should allow overirding the HTTP client via an SPI or similar much like many of the other AWS SDK's. Alternatively upgrade to use httpclient5
The text was updated successfully, but these errors were encountered:
I used the default ApachHTTP client,
as I did not want to bring in an additional dependency to use the CRT Client,
so the demonstration does not really address your concern.
If the KMS Client object, from the AWS SDK for Java V2,
does not allow you to use an HTTP Client that avoids thread pinning,
we would need to bring this up with @aws/aws-sdk-java-team .
Problem:
There is thread pinning when using the AWS Encryption SDK as it uses an old Apache HTTP client which causes pinning here:
org.apache.http.pool.AbstractConnPool$2.get(AbstractConnPool.java:256) <== monitors:1
The source:
@Override public E get(final long timeout, final TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException { for (;;) { **synchronized (this) {** try { final E entry = entryRef.get(); if (entry != null) { return entry; } if (done.get()) { throw new ExecutionException(operationAborted()); } final E leasedEntry = getPoolEntryBlocking(route, state, timeout, timeUnit, this); if (validateAfterInactivity > 0) { if (leasedEntry.getUpdated() + validateAfterInactivity <= System.currentTimeMillis()) { if (!validate(leasedEntry)) { leasedEntry.close(); release(leasedEntry, false); continue; } } }
Solution:
The Encryption SDK should allow overirding the HTTP client via an SPI or similar much like many of the other AWS SDK's. Alternatively upgrade to use httpclient5
The text was updated successfully, but these errors were encountered: