Sfoglia il codice sorgente

totemconfig: Make sure join timeout is less than consensus

The thesis contains this paragraph:

" The Join timeout is shorter than the Consensus timeout and is used to
  increase the probability that Join messages from all currently
  working processors are received during a single round of consensus."

Empirically I can confirm that making join less than consensus can cause
havoc with a cluster so I think we should enforce this.

Signed-off-by: Christine Caulfield <ccaulfie@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Christine Caulfield 11 anni fa
parent
commit
88dbb9f722
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. 7 0
      exec/totemconfig.c

+ 7 - 0
exec/totemconfig.c

@@ -268,6 +268,13 @@ static int totem_volatile_config_validate (
 		goto parse_error;
 	}
 
+	if (totem_config->consensus_timeout < totem_config->join_timeout) {
+		snprintf (local_error_reason, sizeof(local_error_reason),
+			"The consensus timeout parameter (%d ms) may not be less than join timeout (%d ms).",
+			totem_config->consensus_timeout, totem_config->join_timeout);
+		goto parse_error;
+	}
+
 	if (totem_config->merge_timeout < MINIMUM_TIMEOUT) {
 		snprintf (local_error_reason, sizeof(local_error_reason),
 			"The merge timeout parameter (%d ms) may not be less than (%d ms).",