Revision 864bed43
ID | 864bed43f9cd610b8bf0857eb6c348d939b3927a |
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
Django >= 1.4.
Non-blocking reads are not implemented, and each query including a row
that is locked by another transaction will block until the lock is
released. Also care must be taken in order to avoid deadlocks or retry
transactions that abort due to deadlocks.
Also, update Network object to use this manager, in order to guarantee
consistency of the IP pool of each Network.
Files
- added
- modified
- copied
- renamed
- deleted