• Giorgos Korfiatis's avatar
    cyclades: Do not save stale objects after a commit · 9b94fc30
    Giorgos Korfiatis authored
    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.
    9b94fc30
servers.py 26.3 KB