Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-19141

Node failes on rebalance during deactivation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.15
    • None
    • Fixed node failure on rebalancing during caches stop
    • Release Notes Required

    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

          Activity

            People

              alex_pl Aleksey Plekhanov
              alex_pl Aleksey Plekhanov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m