Uploaded image for project: 'JGroups'
  1. JGroups
  2. JGRP-1232

GossipRouter.stop() call to GossipRouter.clear() is ignored due to GossipRouter.running

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.10.1, 2.11
    • 2.10
    • None
    • Workaround Exists
    • Hide

      Call GR.clear() prior to calling GR.stop()

      Show
      Call GR.clear() prior to calling GR.stop()

      Came across this while working on Infinispan integration into AS 6. One of the AS test cases (integration branch view http://anonsvn.jboss.org/repos/jbossas/branches/infinispan-int/testsuite/src/main/org/jboss/test/cluster/defaultcfg/test/DRMTestCase.java) is starting a gossip router for testing (with two members). After testing a few things, we stop the gossip router. We then test to see if the group membership (via AS cluster partition abstraction) has been updated). It is expected that each AS node will see one member in their view but they still see two (which triggers a failure).

      Anyway, while looking into the above, I noticed that GossipRouter.stop invokes GossipRouter.clear but only after setting GossipRouter.running = false. GossipRouter.clear will not close the client connections as a result. Perhaps we should have GossipRouter.stop + GossipRouter.clear both call an internal clear that is unguarded (e.g. let the public methods guard against GossipRouter.running being false).

      As a short term workaround for the above unit test failure, I changed DRMTestCase to call GossipRouter.clear() before GossipRouter.stop().

            vblagoje Vladimir Blagojevic (Inactive)
            smarlow1@redhat.com Scott Marlow
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: