History | View | Annotate | Download (25.7 kB)
LockSet: invert try/for nesting in acquire()
This patch changes nothing to the functionality of a LockSet. Rather thantrying to do the whole for loop we try each of its steps. This opens the way tohandle differently a single failure.
Reviewed-by: imsnah
Initial GanetiLockManager implementation
Includes some locking-related constants and explanations on how theLockManager should be used, the class itself and its test cases.
The class includes: - a basic constructor - functions to acquire and release lists of locks at the same level...
LockSet: make acquire() fail faster on wrong locks
This patch makes acquire() first look up all the locks in the dict and then tryto acquire them later. The advantage is that if a lockname is already wrongsince the beginning we won't need to first queue and acquire other locks to...
LockSet implementation and unit tests
A LockSet represents locking for a set of resources of the same type. A threadcan acquire multiple resources at the same time, and release some or all ofthem, but cannot acquire more resources incrementally at different times...
Add the delete() operation to SharedLock
This new operation lets a lock be cleanly deleted. The lock will be exclusivelyheld before deletion, and after it pending and future acquires will raise anexception. Other SharedLock operations are modify to deal with delete() and to...
Fix a couple of SharedLock docstrings
Use the actual class name rather than a spaced version of it.
Reviewed-by: iustinp
Shared Lock implementation and unit tests.
Adding a locking.py file for the ganeti locking library. Its first component isthe implementation of a non-recursive blocking shared lock complete with atesting library.
Reviewed-by: imsnah, iustinp