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

Re: Deadlocks

From: Branko ─îibej <brane_at_xbc.nu>
Date: 2003-05-27 20:16:19 CEST

cmpilato@collab.net wrote:

>=?UTF-8?B?QnJhbmtvIMSMaWJlag==?= <brane@xbc.nu> writes:
>
>
>> Yes, I was thinking of this when I looked at the trail.c code the other
>>
>>day. I don't know if it really has to be randomized, though; a simple
>>yield -- sleep(0) -- might be enough, given different timing.
>>
>>
>
>Is this what you're looking for?
>
>* subversion/libsvn_fs/trail.c
> (svn_fs__retry_txn): Yield control on deadlock.
>
>Index: subversion/libsvn_fs/trail.c
>===================================================================
>--- subversion/libsvn_fs/trail.c (revision 6063)
>+++ subversion/libsvn_fs/trail.c (working copy)
>@@ -150,6 +150,10 @@
>
> /* We deadlocked. Abort the transaction, and try again. */
> SVN_ERR (abort_trail (trail, fs));
>+
>+ /* Yield; let's see if some of the traffic congestion clears up
>+ before we try again. */
>+ apr_sleep (0);
> }
> }
>
>

Yes, something like that. A yield is probably enough on a single-cpu
machine; I wouldn't venture to guess about multiple-cpu boxes. D.J., can
you rerun your test with this patch applied? Tell us if it makes a
difference, etc.? We might end up having a randomized sleep anyway.

-- 
Brane ─îibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 27 20:19:16 2003

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.