Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Jun 2011 07:07:27 +0000 (UTC)
From:      Mikolaj Golub <trociny@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r223181 - head/sbin/hastd
Message-ID:  <201106170707.p5H77R4H065881@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trociny
Date: Fri Jun 17 07:07:26 2011
New Revision: 223181
URL: http://svn.freebsd.org/changeset/base/223181

Log:
  In HAST we use two sockets - one for only sending the data and one for
  only receiving the data. In r220271 the unused directions were
  disabled using shutdown(2).
  
  Unfortunately, this broke automatic receive buffer sizing, which
  currently works only for connections in ETASBLISHED state. It was a
  root cause of the issue reported by users, when connection between
  primary and secondary could get stuck.
  
  Disable the code introduced in r220271 until the issue with automatic
  buffer sizing is not resolved.
  
  Reported by:	Daniel Kalchev <daniel@digsys.bg>, danger, sobomax
  Tested by:	Daniel Kalchev <daniel@digsys.bg>, danger
  Approved by:	pjd (mentor)
  MFC after:	1 week

Modified:
  head/sbin/hastd/primary.c
  head/sbin/hastd/secondary.c

Modified: head/sbin/hastd/primary.c
==============================================================================
--- head/sbin/hastd/primary.c	Fri Jun 17 07:06:42 2011	(r223180)
+++ head/sbin/hastd/primary.c	Fri Jun 17 07:07:26 2011	(r223181)
@@ -726,11 +726,13 @@ init_remote(struct hast_resource *res, s
 		(void)hast_activemap_flush(res);
 	}
 	nv_free(nvin);
+#ifdef notyet
 	/* Setup directions. */
 	if (proto_send(out, NULL, 0) == -1)
 		pjdlog_errno(LOG_WARNING, "Unable to set connection direction");
 	if (proto_recv(in, NULL, 0) == -1)
 		pjdlog_errno(LOG_WARNING, "Unable to set connection direction");
+#endif
 	pjdlog_info("Connected to %s.", res->hr_remoteaddr);
 	if (inp != NULL && outp != NULL) {
 		*inp = in;

Modified: head/sbin/hastd/secondary.c
==============================================================================
--- head/sbin/hastd/secondary.c	Fri Jun 17 07:06:42 2011	(r223180)
+++ head/sbin/hastd/secondary.c	Fri Jun 17 07:07:26 2011	(r223181)
@@ -183,9 +183,11 @@ init_remote(struct hast_resource *res, s
 	unsigned char *map;
 	size_t mapsize;
 
+#ifdef notyet
 	/* Setup direction. */
 	if (proto_send(res->hr_remoteout, NULL, 0) == -1)
 		pjdlog_errno(LOG_WARNING, "Unable to set connection direction");
+#endif
 
 	map = NULL;
 	mapsize = 0;
@@ -351,9 +353,11 @@ init_remote(struct hast_resource *res, s
 	if (map != NULL)
 		free(map);
 	nv_free(nvout);
+#ifdef notyet
 	/* Setup direction. */
 	if (proto_recv(res->hr_remotein, NULL, 0) == -1)
 		pjdlog_errno(LOG_WARNING, "Unable to set connection direction");
+#endif
 	if (res->hr_secondary_localcnt > res->hr_primary_remotecnt &&
 	     res->hr_primary_localcnt > res->hr_secondary_remotecnt) {
 		/* Exit on split-brain. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106170707.p5H77R4H065881>