[Yum-devel] locking

James Antill james.antill at redhat.com
Thu Feb 21 15:42:53 UTC 2008


On Thu, 2008-02-21 at 16:17 +0100, Florian Festi wrote:

> If it gets implemented that simple we can get deadlocked quite easily.
> 
> instance 1: lock repo1
> instance 2: lock repo2
> instance 1: lock repo2 -> wait
> instance 2: lock repo1 -> wait -> deadlock

 Well the only thing I wasn't sure about is if that was possible, at
least I think the repos will always be in the same order due to glob()
ordering alphabetically.
 enable/disable repo. confuses this somewhat, so I'm not convinced it
works in those cases (and GUI etc. apps. would need to lock everything,
I think).

> The solution is to release all acquired locks when a lock cannot be 
> obtained. But this requires that there is a central place in the code that 
> acquires all the locks at once - otherwise see above...

 Not only that but we'd need to be able to deal with the cache changing
mid usage which we can't do atm. ... so releasing locks isn't possible
AFAIK.

-- 
James Antill <james.antill at redhat.com>
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20080221/e0ba4617/attachment.pgp 


More information about the Yum-devel mailing list