subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1465622 - /subversion/trunk/subversion/libsvn_ra_svn/marshal.c
Date Mon, 08 Apr 2013 13:12:18 GMT
Author: stefan2
Date: Mon Apr  8 13:12:18 2013
New Revision: 1465622

URL: http://svn.apache.org/r1465622
Log:
Fix a ra_svn deadlock caused by the socket timeout handling introduced
for zero-copy server option.  In particular, it interfered with "never
block" and "always block" behavior that some parts of the protocol
seem to rely on.

We now rely on the network stack to detect stale clients.  This not
worse than before: A server thread could always hang for a long time
waiting for socket to either fail or be serviced.  The only difference
with the zero-copy code is that during this waiting period, other
threads cannot write to one segment of the cache, i.e. there is some
performance hit.

* subversion/libsvn_ra_svn/marshal.c
  (ZERO_COPY_TIMEOUT): drop
  (get_timeout): revert to 1.7.x mechanics

Modified:
    subversion/trunk/subversion/libsvn_ra_svn/marshal.c

Modified: subversion/trunk/subversion/libsvn_ra_svn/marshal.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/marshal.c?rev=1465622&r1=1465621&r2=1465622&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_svn/marshal.c (original)
+++ subversion/trunk/subversion/libsvn_ra_svn/marshal.c Mon Apr  8 13:12:18 2013
@@ -56,19 +56,12 @@
 
 #define SUSPICIOUSLY_HUGE_STRING_SIZE_THRESHOLD (0x100000)
 
-/* When zero copy has been enabled, don't use blocking writes.  Instead,
- * time out after this many microseconds. */
-
-#define ZERO_COPY_TIMEOUT 1000000
-
 /* Return the APR socket timeout to be used for the connection depending
  * on whether there is a blockage handler or zero copy has been activated. */
 static apr_interval_time_t
 get_timeout(svn_ra_svn_conn_t *conn)
 {
-  return conn->block_handler ? 0
-                             : (conn->zero_copy_limit ? ZERO_COPY_TIMEOUT
-                                                      : -1);
+  return conn->block_handler ? 0 : -1;
 }
 
 /* --- CONNECTION INITIALIZATION --- */



Mime
View raw message