[jboss-jira] [JBoss JIRA] Created: (JGRP-380) MERGE3 can be left in an inconsistent state

Vincent Hartsteen (JIRA) jira-events at jboss.com
Wed Dec 13 07:56:38 EST 2006


MERGE3 can be left in an inconsistent state
-------------------------------------------

                 Key: JGRP-380
                 URL: http://jira.jboss.com/jira/browse/JGRP-380
             Project: JGroups
          Issue Type: Bug
    Affects Versions: 2.4
            Reporter: Vincent Hartsteen
         Assigned To: Bela Ban
             Fix For: 2.4.1


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  *****
        }
    }


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list