[Engine-devel] Requirement for Locking Mechanism

Michael Kublin mkublin at redhat.com
Tue Nov 29 10:13:10 UTC 2011


Hi All, 

We are introducing a new short term locking mechanism at engine.
The motivation is races which are occurring between different flows, the main problem is :
we did not update status of some entity and other flow was started , which is a main cause for different collisions and situation which
can not be fixed in appropriate way by engine or vdsm.
The current status is a workaround which is trying to reduce a race : in many places in the code, there is additional query to DB in order to check the appropriate status of entity.
The proposed solution is internal locking mechanism - which will lock an appropriate entity until its status will not be updated in DB, after that
an internal short term lock will be released.

The design for locking mechanism can be found here: http://www.ovirt.org/wiki/Features/DetailedLockMechanism
The patch which is introduce an implementation for mechanism can be found here: http://gerrit.ovirt.org/#change,403
(Using of new mechanism all around a code and integration with bll will be sent in the future, including cleaning of workaround)

Regards Michael




More information about the Engine-devel mailing list