« Previous | Next » 

Revision 32a0b855


Added by Giorgos Korfiatis over 10 years ago

cyclades: Do not save stale objects after a commit

Call to issue_and_accept_commission saves the resource object (eg a vm)
and commits the transaction. This has the side-effect that the resource
object becomes stale: its lock is released and another thread may acquire
it and update the db record. It is thus not safe to further update and then
save the stale object, since this would override others' changes. Instead,
lock and fetch the object again, where needed.


  • added
  • modified
  • copied
  • renamed
  • deleted

View differences