Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.nio.BufferUnderflowException #11772

Open
msput86 opened this issue Dec 24, 2024 · 2 comments
Open

java.nio.BufferUnderflowException #11772

msput86 opened this issue Dec 24, 2024 · 2 comments

Comments

@msput86
Copy link

msput86 commented Dec 24, 2024

Sometimes we catch the exception java.nio.BufferUnderflowException.

java.nio.BufferUnderflowException: null
	at java.base/java.nio.Buffer.nextGetIndex(Buffer.java:707)
	at java.base/java.nio.HeapByteBuffer.getInt(HeapByteBuffer.java:435)
	at org.apache.ignite.internal.binary.streams.BinaryByteBufferInputStream.readInt(BinaryByteBufferInputStream.java:111)
	at org.apache.ignite.internal.binary.BinaryReaderExImpl.readInt(BinaryReaderExImpl.java:746)
	at org.apache.ignite.internal.client.thin.ClientCacheAffinityMapping.readCacheKeyConfiguration(ClientCacheAffinityMapping.java:240)
	at org.apache.ignite.internal.client.thin.ClientCacheAffinityMapping.readResponse(ClientCacheAffinityMapping.java:197)
	at org.apache.ignite.internal.client.thin.ClientCacheAffinityContext.readPartitionsUpdateResponse(ClientCacheAffinityContext.java:154)
	at org.apache.ignite.internal.client.thin.TcpClientChannel.receive(TcpClientChannel.java:412)
	at org.apache.ignite.internal.client.thin.TcpClientChannel.service(TcpClientChannel.java:311)
	at org.apache.ignite.internal.client.thin.ReliableChannel.lambda$affinityInfoIsUpToDate$6(ReliableChannel.java:423)
	at org.apache.ignite.internal.client.thin.ReliableChannel.applyOnNodeChannel(ReliableChannel.java:746)
	at org.apache.ignite.internal.client.thin.ReliableChannel.affinityInfoIsUpToDate(ReliableChannel.java:422)
	at org.apache.ignite.internal.client.thin.ReliableChannel.affinityService(ReliableChannel.java:316)
	at org.apache.ignite.internal.client.thin.TcpClientCache.txAwareService(TcpClientCache.java:1132)
	at org.apache.ignite.internal.client.thin.TcpClientCache.cacheSingleKeyOperation(TcpClientCache.java:1191)
	at org.apache.ignite.internal.client.thin.TcpClientCache.get(TcpClientCache.java:146)
My thin client config:
 ClientConfiguration conf = new ClientConfiguration();
            conf.setAddresses(...);
            conf.setHeartbeatEnabled(true);
            conf.setHeartbeatInterval(30000);
            conf.setPartitionAwarenessEnabled(true);
            conf.setTimeout(7000);
            conf.setReconnectThrottlingPeriod(10000);
  There is  my 2 caches  (but server runs more than 30 other caches)        
      new ClientCacheConfiguration()
                    .setName(config.getProviderCacheName())
                    .setCacheMode(CacheMode.PARTITIONED)
                    .setQueryEntities(new QueryEntity(String.class, Provider.class))
                    .setCopyOnRead(false)
                    .setDataRegionName("prv_region")
                    .setBackups(1)
                    .setGroupName("prv_group")
                    .setStatisticsEnabled(true);   
    new ClientCacheConfiguration()
                    .setName(config.getProviderIdxCacheName())
                    .setCacheMode(CacheMode.PARTITIONED)
                    .setQueryEntities(new QueryEntity(Long.class, IdProvider.class))
                    .setDataRegionName("prv_region")
                    .setBackups(1)
                    .setOnheapCacheEnabled(true)
                    .setGroupName("prv_group")
                    .setStatisticsEnabled(true);

How we can avoid this exception?
Ignite 2.15.0 (client and server)

@ptupitsyn
Copy link
Contributor

Please add:

  • Client version
  • Server version

@msput86
Copy link
Author

msput86 commented Dec 24, 2024

This happens when someone creates a cache in the neighboring data region (no group).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants