Statistics
| Branch: | Tag: | Revision:

root / snf-cyclades-app / synnefo / db / managers.py @ a633e247

History | View | Annotate | Download (4.3 kB)

# Date Author Comment
dbecf586 02/14/2013 01:38 pm Christos Stavrakakis

Fix whitespace, Licence

1c11bace 02/14/2013 01:25 pm Christos Stavrakakis

Re-implement select_for_update

Previous implementation of 'select_for_update' method was based on an
attribute of the 'ForUpdateManager'. However, the model manager is shared
between all threads, which lead to race conditions. This commit
reimplements 'select_for_update', by making it return a custom QuerySet...

68b952f9 02/01/2013 04:52 pm Christos Stavrakakis

pep8 fixes

adc46059 09/28/2012 12:19 pm Christos Stavrakakis

Perform allocations in separate transactions

Add ForUpdateManager to the Backend model, in order to guarantee
exclusive order when allocating a VM.

Use manual transactions when allocating Backend and public IP for a new
VM, since these allocations need exclusive access (SELECT..FOR UPDATE)...

864bed43 07/23/2012 11:49 am Christos Stavrakakis

Implement model manager using row-level db locking

Implement ForUpdateManager that uses SELECT .. FOR UPDATE statement in
order to acquire row-level exclusive locks to DB. Essentially this
manager backports the select_for_update() method that is implemented in...