The issues below are observed when trying to test rsocket native-image support
1.
Caused by: java.lang.RuntimeException: java.lang.NoSuchFieldException: producerIndex",
" at io.rsocket.internal.jctools.queues.UnsafeAccess.fieldOffset(UnsafeAccess.java:92) ~[na:na]",
" at io.rsocket.internal.jctools.queues.BaseMpscLinkedArrayQueueProducerFields.<clinit>(BaseMpscLinkedArrayQueue.java:53) ~[rsocket:na]",
" ... 34 common frames omitted",
"Caused by: java.lang.NoSuchFieldException: producerIndex",
" at java.lang.Class.getDeclaredField(DynamicHub.java:968) ~[rsocket:na]",
" at io.rsocket.internal.jctools.queues.UnsafeAccess.fieldOffset(UnsafeAccess.java:90) ~[na:na]",
" ... 35 common frames omitted",
When a ChannelHandler is added to the Netty channel pipeline,
io.netty.channel.ChannelHandlerMask#mask0 will inspect the ChannelHandler's methods for
io.netty.channel.ChannelHandlerMask.Skip annotation.
When there are no reflection hints, NoSuchMethodException is thrown when trying to query the methods.
This will lead to methods marked as not skippable, although the program will be able to run
without any problems, when all methods are marked as not skippable, one might observe performance issues.
Modifications:
Add reflection hints for jctools queues
Add reflection hints for ChannelHandler's
Result:
No issues when testing rsocket native-image support
Motivation:
The issues below are observed when trying to test rsocket native-image support 1.
ChannelHandler
is added to theNetty
channel pipeline,io.netty.channel.ChannelHandlerMask#mask0
will inspect theChannelHandler's
methods forio.netty.channel.ChannelHandlerMask.Skip
annotation. When there are no reflection hints,NoSuchMethodException
is thrown when trying to query the methods. This will lead to methods marked as not skippable, although the program will be able to run without any problems, when all methods are marked as not skippable, one might observe performance issues.Modifications:
jctools queues
ChannelHandler's
Result:
No issues when testing rsocket native-image support