Details
-
Bug
-
Resolution: Done
-
Major
-
12.1.7.Final
-
None
Description
I am getting following error when using an indexed field in a remote query while setting startOffset=10 and maxResults=-1:
13:43:07,494 WARN [org.infinispan.HOTROD] (HotRod-client-async-pool-2-2) ISPN004005: Error received from the server: java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 ... org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=111 returned server error (status=0x85): java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0 at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:333) at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:172) at org.infinispan.client.hotrod.impl.transport.netty.HeaderDecoder.decode(HeaderDecoder.java:139) at org.infinispan.client.hotrod.impl.transport.netty.HintedReplayingDecoder.callDecode(HintedReplayingDecoder.java:94) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:276) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:795) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:480) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)
The query is following:
RemoteQuery{queryString=FROM kc.HotRodRoleEntity c WHERE ((c.id IN (:id0, :id1, :id2, :id3, :id4, :id5, :id6, :id7, :id8, :id9, :id10, :id11, :id12, :id13, :id14, :id15, :id16, :id17, :id18, :id19)) AND (c.realmId = :realmId0)) ORDER BY name ASC, namedParameters={...}, startOffset=10, maxResults=-1, timeout=-1}
Fields used in the query with indices:
@ProtoDoc("@Field(index = Index.YES, store = Store.YES)") @ProtoField(number = 4) public String name; @ProtoDoc("@Field(index = Index.YES, store = Store.YES)") @ProtoField(number = 3) public String realmId; @ProtoDoc("@Field(index = Index.YES, store = Store.YES)") @ProtoField(number = 2, required = true) public String id;
If I remove the ORDER BY part the error is still there. The error is gone when I remove the index annotation on name field.
The exception is thrown when calling
CloseableIterator<E> iterator = query.iterator();