[Openais] defect 73 partial fix

Steven Dake sdake at mvista.com
Mon Oct 18 15:49:08 PDT 2004


Mark

Here is a partial fix for #73.  Basically I classify this bug as the
fact that openais behaves poorly if the executive is started and stopped
with the debugger.  In all cases we want this to work properly by
kicking the processor out of the membership and making correct conensus
decisions.

I find that the current gmi doesn't do this very well (yet).

Try out the partial fix and let me know if it improves things.

During this process, I noticed that part of the membership algorithm is
not implemented properly (the failed processor conensus).  I'll work
that out next and see if that gets us better consensus behavior.

Thanks
-steve

-------------- next part --------------
--- defect-73.orig/exec/gmi.c	2004-10-18 13:36:03.000000000 -0700
+++ defect-73/exec/gmi.c	2004-10-18 15:39:45.000000000 -0700
@@ -3191,11 +3195,22 @@
 		 */
 	}
 
+	/*
+	 * Restart the gather timeout
+	` */
 	poll_timer_delete (*gmi_poll_handle, timer_memb_state_gather_timeout);
 
 	poll_timer_add (*gmi_poll_handle, TIMEOUT_STATE_GATHER, 0,
 		memb_timer_function_state_gather, &timer_memb_state_gather_timeout);
 
+	/*
+	 * If we already started a commit, stop it since we are
+	 * going back into the gather state
+	 */
+	poll_timer_delete (*gmi_poll_handle, timer_memb_state_commit_timeout);
+
+	timer_memb_state_commit_timeout = 0;
+
 	return (res);
 }
 
@@ -3652,9 +3667,11 @@
 			}
 			break;
 
-		default:
-			// TODO what about other states
-			gmi_log_printf (gmi_log_level_error, "memb_attempt_join: EVS or FORM state attempt join occured %d\n", memb_state);
+		case MEMB_STATE_FORM:
+		case MEMB_STATE_EVS:
+			gmi_log_printf (gmi_log_level_error,
+				"memb_attempt_join: FORM, EVS %d\n", memb_state);
+			break;
 	}
 
 	return (0);


More information about the Openais mailing list