[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: SVN and NetWare moves along...

From: mark benedetto king <mbk_at_lowlatency.com>
Date: 2005-11-23 13:53:44 CET

On Sun, Nov 13, 2005 at 06:37:55PM +0100, Branko ??ibej wrote:
> NormW wrote:
> >- At the bottom of main.c there's a while (1) loop, with no visible
> >exit means on it; how do other platforms shut down 'svnserve'? (I'm
> >using 'daemon' mode since that's the closest we have of the modes that
> >are available).
> There's no way to shut down svnserve short of killing the process.

This would be a nice feature to add (clean shutdown). How would it
be triggered?

> >- Once a thread is created for a connection, does it ever close?
> Yes, a thread serves one request, then exits. I know it's not the most
> optimal thing to do, but that's what we have now.
> >- It seems there is nothing to prevent a shutdown in the middle of
> >request processing on a thread?
> That's right.
> >- Some MaxThreads count limit would be desirable I think.
> The trouble with this is that the "dumb" way of limiting the number of
> threads could easily lead to a deadlock. A client can open several
> interdependent connections to svnserve, and if we just blindly limited
> the number of threads, that'd lead th clients blocking themselves.
> (I tried that once, so this is based on experience, not conjecture. :)

Maybe something like

    if (thread_count > high_water)
        sleep(base*pow(backoff, thread_count - high_water));

might work as a heuristic to prevent the creation of more threads
than the server can handle, while still guaranteeing that all requests
complete... eventually.

Or maybe it's wiser to implement a "server too busy" response,
and let the clients figure it how to handle the error (this could
result in starvation, though).


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 23 13:51:40 2005

This is an archived mail posted to the Subversion Dev mailing list.