Serialize build retirement and clone classification, bound ops accepts

Review fixes for M7.6-M7.9. Schema v9 applies one lock order: the
barrier takes a database-wide upgrade lock exclusively, while
acquisitions, lease checks, provisioning and the retired-build trigger
take it shared first, so a queued acquisition can no longer regain
authority for a just-retired build and concurrent barriers cannot
retire the last current build. Provisioning takes a per-world lock
before classifying a world as original or a clone of one source. The
operations listener makes at most four accept attempts per serve().
Race regressions prove each contender is blocked before commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
dingo
2026-09-29 08:38:13 -04:00
co-authored by Claude Opus 5.5
parent f59cca2c3b
commit 168c90d5b2
14 changed files with 616 additions and 15 deletions
+7
View File
@@ -164,6 +164,13 @@ To upgrade the build:
returns the number of leases fenced, and refuses to retire the last current
build.
Schema v9 serializes all of this under one lock order (ADR-0068 amendment). The
barrier takes a database-wide advisory lock (71420002) exclusively. Acquisitions,
lease checks, provisioning and the retired-build trigger take it shared, and
provisioning also takes a per-world lock (71420003). A barrier therefore briefly
waits for in-flight commits and blocks new ones. Keep other advisory locks away
from these two keys.
Old images then quarantine (exit 4) instead of serving. Rules and format changes
are refused explicitly; there is no converter.