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

MERGE3 can be left in an inconsistent state

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.4.1
    • 2.4
    • None

      MERGE3 can be left in an inconsistent state when it initiates a VIEW_CHANGE in case more than 1 coordinator is found on the network but when that VIEW_CHANGE is cancelled lateron in the stack. This leaves the node thinking it is a coordinator (is_coord remains true) but its announcements is not preloaded with its own address.

      The suggested fix is to add the local address of the node to the list of announcements right after the announcements list is cleared.

      void processAnnouncements() {
      if(announcements.size() > 1) {
      Vector coords=new Vector(announcements); // create a clone
      if(coords.size() > 1) {
      if(log.isDebugEnabled())
      log.debug("passing up MERGE event, coords=" + coords);
      final Event evt=new Event(Event.MERGE, coords);
      if(use_separate_thread) {
      Thread merge_notifier=new Thread(Util.getGlobalThreadGroup(), "merge notifier thread") {
      public void run()

      { passUp(evt); }

      };
      merge_notifier.setDaemon(true);
      merge_notifier.start();
      }
      else

      { passUp(evt); }

      }
      announcements.clear();
      announcements.add(local_addr); // ***** POSSIBLE FIX *****
      }
      }

              rhn-engineering-bban Bela Ban
              hartsteen Vincent Hartsteen (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: