« Previous | Next » 

Revision 32a0b855

ID32a0b8556279300a86d74c0b702086e5a5c542a0

Added by Giorgos Korfiatis about 8 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.

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences