[Xapian-tickets] [Xapian] #546: xapian-replicate reads from a socket without using timeouts
Xapian
nobody at xapian.org
Mon Mar 30 01:34:22 BST 2015
#546: xapian-replicate reads from a socket without using timeouts
-------------------------+-----------------------------
Reporter: nkvoll | Owner: olly
Type: defect | Status: assigned
Priority: normal | Milestone: 1.3.3
Component: Replication | Version:
Severity: normal | Resolution:
Keywords: | Blocked By:
Blocking: | Operating System: All
-------------------------+-----------------------------
Changes (by olly):
* status: new => assigned
Comment:
POSIX says ''Note that not all implementations allow this option to be
set'':
http://pubs.opengroup.org/onlinepubs/009695399/functions/setsockopt.html
Checking on-line copies of man pages, settings `SO_RCVTIMEO` and
`SO_SNDTIMEO` are supported on:
* Linux: http://linux.die.net/man/7/socket
* FreeBSD: http://www.freebsd.org/cgi/man.cgi?query=setsockopt&sektion=2
* NetBSD: http://netbsd.gw.com/cgi-bin/man-cgi?setsockopt+2+NetBSD-
current
* OpenBSD: http://www.openssh.com/cgi-bin/man.cgi/OpenBSD-
current/man2/setsockopt.2?query=setsockopt&sec=2
* OS X:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man2/setsockopt.2.html
* Windows: https://msdn.microsoft.com/en-
us/library/windows/desktop/ms740476%28v=vs.85%29.aspx
* HP Tru64:
http://h50146.www5.hp.com/products/software/oe/tru64unix/manual/v51a_ref/HTML/MAN/MAN2/0183____.HTM
The Solaris man page doesn't mention these settings, though they are
defined in `sys/socket.h`. However, it seems Solaris doesn't actually
support them: https://issues.apache.org/jira/browse/THRIFT-1371
And AIX allows them to be set, but doesn't use them:
http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.commtrf2/getsockopt.htm?lang=en
So they are supported by at least the common open operating systems, and
some of the proprietary ones. I'm inclined to say we just make use of
them, and accept a clean patch if someone cares enough to fix this for
other platforms (as noted in the comments above, the attached patch makes
the whole replication time out if it takes too long, which isn't what we
want at all). Having working timeouts on most platforms beats not having
them anywhere.
--
Ticket URL: <http://trac.xapian.org/ticket/546#comment:12>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list