Details
Description
Failure handler triggered if caches is stopped (for example, due to deactivation) and node is processing partitions supply message. Reproducer:
@Override protected FailureHandler getFailureHandler(String igniteInstanceName) { return new StopNodeFailureHandler(); } @Test public void testRebalanceOnDeactivate() throws Exception { IgniteEx ignite0 = startGrid(0); IgniteEx ignite1 = startGrid(1); ignite0.cluster().state(ClusterState.ACTIVE); ignite0.cluster().baselineAutoAdjustEnabled(false); for (int i = 0; i < 10; i++) { IgniteCache<Integer, Integer> cache = ignite0.getOrCreateCache( new CacheConfiguration<Integer, Integer>(DEFAULT_CACHE_NAME).setBackups(1) .setAffinity(new RendezvousAffinityFunction(false, 2))); cache.clear(); stopGrid(0); try (IgniteDataStreamer<Integer, Integer> streamer = ignite1.dataStreamer(DEFAULT_CACHE_NAME)) { for (int j = 0; j < 100_000; j++) streamer.addData(j, j); } ignite0 = startGrid(0); ignite0.cluster().state(ClusterState.INACTIVE); ignite0.cluster().state(ClusterState.ACTIVE); } }
Fails with:
java.lang.AssertionError: stopping=false, groupName=null, caches=[] at org.apache.ignite.internal.processors.cache.CacheGroupContext.singleCacheContext(CacheGroupContext.java:447) ~[classes/:?] at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionDemander.handleSupplyMessage(GridDhtPartitionDemander.java:584) ~[classes/:?] at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPreloader.lambda$handleSupplyMessage$0(GridDhtPreloader.java:346) ~[classes/:?]
Attachments
Issue Links
- links to