Is it possible to use keySet() or entrySet() to go over the cache entries remotely in RHDG?

Solution Unverified - Updated -

Issue

  • Is it possible to iterate over all entries for a remote client
  • If I use cache.keySet() for iteration the server constantly show errors like below and there are issues with the processing as it seems it is sporadically not completed
ERROR [org.infinispan.server.hotrod.HotRodEncoder] (HotRod-hotrod-externalServerWorker-5-14) ISPN005022: Exception writing response with messageId=2284701: io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 939524096, max: 954728448)
    at io.netty.util.internal.PlatformDependent.incrementMemoryCounter(PlatformDependent.java:624) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.util.internal.PlatformDependent.allocateDirectNoCleaner(PlatformDependent.java:578) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.buffer.PoolArena$DirectArena.allocateDirect(PoolArena.java:718) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.buffer.PoolArena$DirectArena.newChunk(PoolArena.java:707) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.buffer.PoolArena.allocateNormal(PoolArena.java:239) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.buffer.PoolArena.allocate(PoolArena.java:221) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.buffer.PoolArena.reallocate(PoolArena.java:381) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.buffer.PooledByteBuf.capacity(PooledByteBuf.java:122) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.buffer.AbstractByteBuf.ensureWritable0(AbstractByteBuf.java:284) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.buffer.AbstractByteBuf.ensureWritable(AbstractByteBuf.java:265) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1036) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1044) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at org.infinispan.server.hotrod.transport.ExtendedByteBuf.writeRangedBytes(ExtendedByteBuf.java:265) [infinispan-server-hotrod.jar:8.4.2.Final-redhat-1]
    at org.infinispan.server.hotrod.Encoder2x.lambda$writeResponse$4(Encoder2x.java:359) [infinispan-server-hotrod.jar:8.4.2.Final-redhat-1]
    at java.util.Iterator.forEachRemaining(Iterator.java:116) [rt.jar:1.8.0_181]
    at org.infinispan.server.hotrod.Encoder2x.writeResponse(Encoder2x.java:357) [infinispan-server-hotrod.jar:8.4.2.Final-redhat-1]
    at org.infinispan.server.hotrod.HotRodEncoder.encode(HotRodEncoder.java:63) [infinispan-server-hotrod.jar:8.4.2.Final-redhat-1]
    at io.netty.handler.codec.MessageToByteEncoder.write(MessageToByteEncoder.java:107) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:739) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:731) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.channel.AbstractChannelHandlerContext.access$1900(AbstractChannelHandlerContext.java:38) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.write(AbstractChannelHandlerContext.java:1090) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.channel.AbstractChannelHandlerContext$WriteAndFlushTask.write(AbstractChannelHandlerContext.java:1137) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.channel.AbstractChannelHandlerContext$AbstractWriteTask.run(AbstractChannelHandlerContext.java:1079) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:304) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) [netty-all-4.1.8.Final.jar:4.1.8.Final]
    at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_181]

Environment

  • Red Hat Data Grid (RHDG)
    • 6
    • 7.0, 7.1

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content