Description
AssertionError is raised for thin client cache operations on inactive cluster. For a such operation clients try to update affinity info. In inactive cluster the topology is not initialized (topVer=-1), and it fails while preparing cache partitions assignment:
java.lang.AssertionError: AffinityTopologyVersion [topVer=-1, minorTopVer=0] at org.apache.ignite.internal.processors.affinity.GridAffinityAssignmentCache.cachedAffinity(GridAffinityAssignmentCache.java:809) ~[classes/:?] at org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.assignment(GridCacheAffinityManager.java:233) ~[classes/:?] at org.apache.ignite.internal.processors.cache.GridCacheAffinityManager.assignment(GridCacheAffinityManager.java:218) ~[classes/:?] at org.apache.ignite.internal.processors.platform.client.cache.ClientCachePartitionsRequest.getCacheAssignment(ClientCachePartitionsRequest.java:170) ~[classes/:?] at org.apache.ignite.internal.processors.platform.client.cache.ClientCachePartitionsRequest.processCache(ClientCachePartitionsRequest.java:144) ~[classes/:?] at org.apache.ignite.internal.processors.platform.client.cache.ClientCachePartitionsRequest.process(ClientCachePartitionsRequest.java:103) ~[classes/:?] at org.apache.ignite.internal.processors.platform.client.ClientRequestHandler.handle(ClientRequestHandler.java:101) ~[classes/:?] at org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:204) ~[classes/:?] at org.apache.ignite.internal.processors.odbc.ClientListenerNioListener.onMessage(ClientListenerNioListener.java:55) ~[classes/:?] at org.apache.ignite.internal.util.nio.GridNioFilterChain$TailFilter.onMessageReceived(GridNioFilterChain.java:279) ~[classes/:?] at org.apache.ignite.internal.util.nio.GridNioFilterAdapter.proceedMessageReceived(GridNioFilterAdapter.java:109) ~[classes/:?] at org.apache.ignite.internal.util.nio.GridNioAsyncNotifyFilter$3.body(GridNioAsyncNotifyFilter.java:97) ~[classes/:?] at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:125) ~[classes/:?] at org.apache.ignite.internal.util.worker.GridWorkerPool$1.run(GridWorkerPool.java:70) ~[classes/:?] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_322] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_322] at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_322]
Reproducer:
package org.apache.ignite; import org.apache.ignite.client.IgniteClient; import org.apache.ignite.cluster.ClusterState; import org.apache.ignite.configuration.CacheConfiguration; import org.apache.ignite.configuration.ClientConfiguration; import org.apache.ignite.configuration.DataRegionConfiguration; import org.apache.ignite.configuration.DataStorageConfiguration; import org.apache.ignite.configuration.IgniteConfiguration; import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.internal.client.thin.AbstractThinClientTest; import org.apache.ignite.internal.util.typedef.G; import org.junit.Test; /** */ public class Reproducer extends AbstractThinClientTest { @Override protected IgniteConfiguration getConfiguration(String igniteInstanceName) throws Exception { IgniteConfiguration cfg = super.getConfiguration(igniteInstanceName); cfg.setDataStorageConfiguration(new DataStorageConfiguration() .setDefaultDataRegionConfiguration(new DataRegionConfiguration().setPersistenceEnabled(true))); cfg.setCacheConfiguration(new CacheConfiguration("default")); return cfg; } /** */ @Test public void test() throws Exception { IgniteEx ign = startGrids(2); ign.cluster().state(ClusterState.ACTIVE); ClientConfiguration ccfg = getClientConfiguration(G.allGrids().toArray(new Ignite[]{})); stopAllGrids(); startGrid(0); IgniteClient cln = Ignition.startClient(ccfg); cln.cache("default").get(0); } }
Attachments
Issue Links
- links to