You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Aleksey Plekhanov (Jira)" <ji...@apache.org> on 2023/03/28 11:23:00 UTC

[jira] [Created] (IGNITE-19141) Node failes on rebalance during deactivation

Aleksey Plekhanov created IGNITE-19141:
------------------------------------------

             Summary: Node failes on rebalance during deactivation
                 Key: IGNITE-19141
                 URL: https://issues.apache.org/jira/browse/IGNITE-19141
             Project: Ignite
          Issue Type: Bug
            Reporter: Aleksey Plekhanov
            Assignee: Aleksey Plekhanov


Failure handler triggered if caches is stopped (for example, due to deactivation) and node is processing partitions supply message. Reproducer:
{code:java}
@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);
    }
}{code}
 Fails with:
{noformat}
 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/:?]{noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)