Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-6293

Registering a clustered listener in a DIST cluster leads to SuspectException if one member is not joined yet

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 8.2.0.Beta2
    • Fix Version/s: 8.2.0.Final, 8.1.3.Final
    • Component/s: None
    • Labels:
      None

      Description

      Reproducer:

      
      import org.infinispan.configuration.cache.CacheMode;
      import org.infinispan.configuration.cache.ConfigurationBuilder;
      import org.infinispan.notifications.Listener;
      import org.infinispan.notifications.cachelistener.annotation.CacheEntryCreated;
      import org.infinispan.notifications.cachelistener.event.CacheEntryEvent;
      import org.infinispan.test.MultipleCacheManagersTest;
      import org.testng.annotations.Test;
      
      @Test(groups = "functional", testName = "ClusteredListenerJoinsTest")
      public class ClusteredListenerJoinsTest extends MultipleCacheManagersTest {
      
         @Listener(clustered = true)
         private static final class NoOpListener {
      
            @CacheEntryCreated
            public void handleEvent(CacheEntryEvent<Object, Object> e) {
            }
         }
      
         @Override
         protected void createCacheManagers() {
            ConfigurationBuilder c = buildConfiguration();
            createCluster(c, 3);
            waitForClusterToForm();
         }
      
         private ConfigurationBuilder buildConfiguration() {
            ConfigurationBuilder c = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, false); //unreproducible with CacheMode.REPL_SYNC
            c.clustering().hash().numOwners(2);
            return c;
         }
      
         public void testJoins() {
            cache(0).addListener(new NoOpListener());
      
            addClusterEnabledCacheManager(buildConfiguration());
            //waitForClusterToForm();
      
            cache(0).addListener(new NoOpListener());  //fails most times with SuspectException; uncomment the line above to ensure it does not fail
         }
      }
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  william.burns Will Burns
                  Reporter:
                  anistor Nistor Adrian
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: