freebsd-dev/sbin/hastd
Maxim Sobolev 98453c81af Read from the socket using the same max buffer size as we use while
sending. What happens otherwise is that the sender splits all the
traffic into 32k chunks, while the receiver is waiting for the whole
packet. Then for a certain packet sizes, particularly 66607 bytes in
my case, the communication stucks to secondary is expecting to
read one chunk of 66607 bytes, while primary is sending two chunks
of 32768 bytes and third chunk of 1071. Probably due to TCP windowing
and buffering the final chunk gets stuck somewhere, so neither server
not client can make any progress.

This patch also protect from short reads, as according to the manual
page there are some cases when MSG_WAITALL can give less data than
expected.

MFC after:	3 days
2011-06-04 16:01:30 +00:00
..
activemap.c Fix a typo in comments. 2011-04-10 15:11:19 +00:00
activemap.h
control.c Keep statistics on number of BIO_READ, BIO_WRITE, BIO_DELETE and BIO_FLUSH 2011-05-23 21:15:19 +00:00
control.h Rename HASTCTL_ defines, which are used for conversion between main 2011-04-26 19:38:30 +00:00
crc32.c Allow to checksum on-the-wire data using either CRC32 or SHA256. 2011-03-06 22:56:14 +00:00
crc32.h Allow to checksum on-the-wire data using either CRC32 or SHA256. 2011-03-06 22:56:14 +00:00
ebuf.c Fix typos. 2010-06-14 21:44:58 +00:00
ebuf.h
event.c Forgot to add event.c and event.h in r212038. 2010-08-31 09:38:43 +00:00
event.h Forgot to add event.c and event.h in r212038. 2010-08-31 09:38:43 +00:00
hast_checksum.c Allow to checksum on-the-wire data using either CRC32 or SHA256. 2011-03-06 22:56:14 +00:00
hast_checksum.h Allow to checksum on-the-wire data using either CRC32 or SHA256. 2011-03-06 22:56:14 +00:00
hast_compression.c Allow to compress on-the-wire data using two algorithms: 2011-03-06 23:09:33 +00:00
hast_compression.h Allow to compress on-the-wire data using two algorithms: 2011-03-06 23:09:33 +00:00
hast_proto.c Add missing ifdef. This fixes build with NO_OPENSSL. 2011-04-26 19:52:21 +00:00
hast_proto.h Remove hast_proto_recv(). It was used only in one place, where 2011-04-17 16:18:45 +00:00
hast.conf.5 Document IPv6 support. 2011-05-20 11:21:39 +00:00
hast.h Keep statistics on number of BIO_READ, BIO_WRITE, BIO_DELETE and BIO_FLUSH 2011-05-23 21:15:19 +00:00
hastd.8 White space cleanups. 2011-03-22 10:39:34 +00:00
hastd.c In preparation for IPv6 support allow to specify multiple addresses to 2011-05-19 23:18:42 +00:00
hastd.h Add function to assert that the only descriptors we have open are the ones 2011-01-28 21:56:47 +00:00
hooks.c Increase debug level of "Checking hooks." message. 2011-03-21 14:53:27 +00:00
hooks.h hook_check() is now only used to report about long-running hooks, so the 2010-10-04 21:43:06 +00:00
lzf.c Allow to compress on-the-wire data using two algorithms: 2011-03-06 23:09:33 +00:00
lzf.h Allow to compress on-the-wire data using two algorithms: 2011-03-06 23:09:33 +00:00
Makefile Rename tcp4 to tcp in preparation for IPv6 support. 2011-05-20 11:09:02 +00:00
metadata.c Plug memory leaks. 2010-06-14 21:25:20 +00:00
metadata.h
nv.c Add nv_assert() which allows to assert that the given name exists. 2011-01-22 22:38:18 +00:00
nv.h Add nv_assert() which allows to assert that the given name exists. 2011-01-22 22:38:18 +00:00
parse.y If no listen address is specified, bind by default to: 2011-05-20 11:16:25 +00:00
pjdlog.c - Add support for AF_INET6 sockets for %S format character. 2011-05-18 22:43:56 +00:00
pjdlog.h Rename pjdlog_verify() to pjdlog_abort() as it better describes what the 2011-01-31 15:52:00 +00:00
primary.c If READ from the local node failed we send the request to the remote 2011-05-29 21:20:47 +00:00
proto_common.c Read from the socket using the same max buffer size as we use while 2011-06-04 16:01:30 +00:00
proto_impl.h The proto API is a general purpose API, so don't use 'hast' in structures or 2011-03-22 16:21:11 +00:00
proto_socketpair.c The proto API is a general purpose API, so don't use 'hast' in structures or 2011-03-22 16:21:11 +00:00
proto_tcp.c Now that hell is fully frozen it is good time to add IPv6 support to HAST. 2011-05-20 11:14:05 +00:00
proto_uds.c The proto API is a general purpose API, so don't use 'hast' in structures or 2011-03-22 16:21:11 +00:00
proto.c The proto API is a general purpose API, so don't use 'hast' in structures or 2011-03-22 16:21:11 +00:00
proto.h In hast.conf we define the other node's address in 'remote' variable. 2011-03-21 08:54:59 +00:00
rangelock.c
rangelock.h
secondary.c Keep statistics on number of BIO_READ, BIO_WRITE, BIO_DELETE and BIO_FLUSH 2011-05-23 21:15:19 +00:00
subr.c To handle BIO_FLUSH and BIO_DELETE requests in secondary worker we need 2011-05-23 20:59:50 +00:00
subr.h Currently we are unable to use capsicum for the primary worker process, 2011-05-14 17:02:03 +00:00
synch.h Plug memory leaks. 2010-10-24 15:41:23 +00:00
token.l Allow [ ] characters in strings. They might be used in IPv6 addresses. 2011-05-20 11:10:39 +00:00