-
Notifications
You must be signed in to change notification settings - Fork 124
Description
Netty 4.2 introduces a new default buffer allocator - see the migration guide and in particular:
Netty 4.2 changes the default allocator to adaptive. To de-risk this change, it is recommended to first upgrade to 4.2 while explicitly configuring the pooled allocator, and then remove the allocator configuration as a second step. To explicitly configure the pooled allocator, set this system property: io.netty.allocator.type=pooled
I have confirmed that in my codebase using lmdbjava, setting the system property means lmdbjava continues to work with netty 4.2.
My inclination would be to add a new buffer proxy PROXY_NETTY_ADAPTIVE, rename the older proxy to PROXY_NETTY_POOLED and for backwards compatibility keep PROXY_NETTY. The latter could default to the same as PROXY_NETTY_POOLED or attempt to choose the default based on netty version (Netty does provide a Version class so this could be determined at runtime and cached but with some added complexity obviously).
I asked Claude to help with this, and I will append its response in a separate message.
What do people think of this idea?
Would there be an appetite to look at a PR to add netty 4.2 support? This would allow performance testing of the new adaptive allocator?