mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-08 19:26:48 +00:00
Two computes decide the owners of the same UUID: the one the VM left buries them in a tombstone (or a compute delete does), the one it went to restores them. On PostgreSQL the two ran at once: the restore still saw the old row of the uncommitted bury, skipped, and the VM ended up without owners while the tombstone stayed. SQLite was never affected: its IMMEDIATE transactions take the write lock at the start. The reconcile and the compute delete now take one transaction-level advisory lock (pg_advisory_xact_lock) when their database step starts, so ownership decisions run one after another on PostgreSQL as they do on SQLite. Reading libvirt stays outside the lock. |
||
|---|---|---|
| .. | ||
| api | ||
| migrations | ||
| templates | ||
| tests | ||
| __init__.py | ||
| apps.py | ||
| forms.py | ||
| models.py | ||
| urls.py | ||
| utils.py | ||
| validators.py | ||
| views.py | ||