public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* STABLE2 - groupd: send and check version messages fix
@ 2008-09-08 19:44 David Teigland
  0 siblings, 0 replies; only message in thread
From: David Teigland @ 2008-09-08 19:44 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=a7f790217bb6914f91d698b481021fb22a923aea
Commit:        a7f790217bb6914f91d698b481021fb22a923aea
Parent:        94832c3e09fe8ed376733cb6ecf446d6b22efd66
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Mon Sep 8 14:10:15 2008 -0500
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Mon Sep 8 14:19:30 2008 -0500

groupd: send and check version messages fix

bz 457104

Don't try to resend these messages (we seem to get TRY_AGAIN
back from cpg a lot for them).  They are non-essential, and we
don't want them to interfere with the existing behavior.

Signed-off-by: David Teigland <teigland@redhat.com>
---
 group/daemon/cpg.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/group/daemon/cpg.c b/group/daemon/cpg.c
index 869cdb3..f8a4e84 100644
--- a/group/daemon/cpg.c
+++ b/group/daemon/cpg.c
@@ -731,7 +731,8 @@ int do_cpg_leave(group_t *g)
 	return 0;
 }
 
-static int _send_message(cpg_handle_t h, group_t *g, void *buf, int len)
+static int _send_message(cpg_handle_t h, group_t *g, void *buf, int len,
+			 int type)
 {
 	struct iovec iov;
 	cpg_error_t error;
@@ -742,6 +743,12 @@ static int _send_message(cpg_handle_t h, group_t *g, void *buf, int len)
 
  retry:
 	error = cpg_mcast_joined(h, CPG_TYPE_AGREED, &iov, 1);
+
+	/* the version messages are non-essential, and we don't want them
+	   to interfere with anything, so don't retry */
+	if (type == MSG_GROUP_VERSION)
+		return 0;
+
 	if (error == CPG_ERR_TRY_AGAIN) {
 		retries++;
 		usleep(1000);
@@ -763,11 +770,11 @@ int send_message_groupd(group_t *g, void *buf, int len, int type)
 	if (groupd_debug_verbose > 1)
 		log_group(g, "SEND len %d %s", len, msg_type(type));
 
-	return _send_message(groupd_handle, g, buf, len);
+	return _send_message(groupd_handle, g, buf, len, type);
 }
 
 int send_message(group_t *g, void *buf, int len)
 {
-	return _send_message(g->cpg_handle, g, buf, len);
+	return _send_message(g->cpg_handle, g, buf, len, 0);
 }
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-09-08 19:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-08 19:44 STABLE2 - groupd: send and check version messages fix David Teigland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).