Closed
Description
Expected Behavior
We use the default PooledByteBufAllocator
in Netty which creates per-thread caches stored in a ThreadLocal
. To avoid polluting threads we don't own, we should ensureByteBuf
s allocated by the Netty client are allocated only on SDK threads.
Current Behavior
It's possible for the Netty client to allocate within a customer's thread, for example, in the onNext
of an SDK Subscriber
with a subscription to a customer provided Publisher
:
Possible Solution
The easiest solution would be to allocate using io.netty.buffer.Unpooled
. Otherwise, we should defer the allocation and run it in the EventLoop
.
Steps to Reproduce (for bugs)
Context
Your Environment
- AWS Java SDK version used: 2.5.10
- JDK version used:
- Operating System and version: