Login | Register
My pages Projects Community openCollabNet

Discussions > dev [DISABLED] > Re: [Issue 3347] svn never times out when (public) IP changes

subversion
Discussion topic

Back to topic list

Re: [Issue 3347] svn never times out when (public) IP changes

Author ghudson
Full name Greg Hudson
Date 2009-05-27 09:51:33 PDT
Message I looked over the code, and I believe you seriously broke things in
r37838, without improving anything related to the issue.

The default timeout for reading from an APR (or Unix) socket is
infinity. During pipelining, we set the timeout to 0 for some write
opreations so that we can try them without blocking. If APR had
separate timeouts for read and write, I would have only set the write
timeout in the first place, and that code in sock_read_cb would be
unnecessary. The comment could perhaps have explained this better, but
I'm not sure if it could have explained it well enough to dispel your
assumptions about what the code was doing.

What you did was remove the code which reverts back to blocking, leaving
the timeout at 0 in certain situations. I don't know exactly what
symptoms this would cause, but I imagine they're nothing good.

As a matter of history, I've not been impressed with application-level
hardcoded timeouts, so I didn't put any into ra_svn. It's not the case,
as you said in #3347, that I explicitly removed some default timeout
present in APR or the operating system; those layers don't have default
timeouts.

What I would recommend to address #3347 is setting the SO_KEEPALIVE flag
on the socket, which will cause the underlying TCP layer to use
keepalive packets to eventually notice when the other half of the
network connection has disappeared without sending a reset. I'm not
sure how to do that through APR, but it's probably not too difficult.

As a matter of process, you should never assume that a piece of code is
present for no reason when you have the means to investigate why it's
there. Using svn blame, you could have (after tracing back through the
code movement in r22238) seen that the code was introduced in r7532, and
correctly interpreted it as part of the pipelining support.

« Previous message in topic | 5 of 13 | Next message in topic »

Messages

Show all messages in topic

Re: [Issue 3347] svn never times out when (public) IP changes Erik Huelsmann <ehuels at gmail dot com> Erik Huelsmann <ehuels at gmail dot com> 2009-05-27 02:38:51 PDT
     Re: [Issue 3347] svn never times out when (public) IP changes stsp Stefan Sperling 2009-05-27 05:41:13 PDT
         Re: [Issue 3347] svn never times out when (public) IP changes Erik Huelsmann <ehuels at gmail dot com> Erik Huelsmann <ehuels at gmail dot com> 2009-05-27 05:44:56 PDT
             Re: [Issue 3347] svn never times out when (public) IP changes stsp Stefan Sperling 2009-05-27 06:06:00 PDT
                 Re: [Issue 3347] svn never times out when (public) IP changes ghudson Greg Hudson 2009-05-27 09:51:33 PDT
                     Re: [Issue 3347] svn never times out when (public) IP changes stsp Stefan Sperling 2009-05-27 10:20:42 PDT
                         Re: [Issue 3347] svn never times out when (public) IP changes ghudson Greg Hudson 2009-05-27 10:27:46 PDT
                     Re: [Issue 3347] svn never times out when (public) IP changes stsp Stefan Sperling 2009-05-27 12:23:13 PDT
                         Re: [Issue 3347] svn never times out when (public) IP changes ghudson Greg Hudson 2009-05-27 13:24:53 PDT
                             Re: [Issue 3347] svn never times out when (public) IP changes stsp Stefan Sperling 2009-05-27 14:34:12 PDT
                                 Re: [Issue 3347] svn never times out when (public) IP changes stsp Stefan Sperling 2009-05-28 14:15:04 PDT
                                     Re: [Issue 3347] svn never times out when (public) IP changes ghudson Greg Hudson 2009-05-28 21:02:57 PDT
                                         Re: [Issue 3347] svn never times out when (public) IP changes stsp Stefan Sperling 2009-05-29 06:43:51 PDT
Messages per page: