Complete M7.9b upgrade barrier and durability qualification
Schema v8 binds authority to builds (ADR-0068): acquisition names the host build and only retained, unretired builds may hold a lease; no commit may name a retired build; upgrade_barrier retires a build and fences every holder in one transaction, while build-less pre-v8 hosts keep working until the first barrier. Tests cover a writer surviving a failed and then a real online migration, old-writer fencing on every path, whole-history recovery by the new build, and the M7 qualification fixture (19.6 s SIGKILL-to-ready under the production lease, no lost acknowledgements). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -68,7 +68,8 @@ every role transitively in it, and rolls back on any violation:
|
||||
`pg_write_all_data`);
|
||||
- any table privilege in `evolution`, including via PUBLIC;
|
||||
- CREATE on the schema, the database or `public`;
|
||||
- EXECUTE outside the eleven fenced functions (schema v6).
|
||||
- EXECUTE outside the twelve fenced functions (schema v8 adds the build-aware
|
||||
`acquire_region_lease`).
|
||||
Attribute checks alone are not enough: a login with `pg_write_all_data` can update
|
||||
lease rows directly. Rerun the migrate Job after adding or changing runtime logins
|
||||
or grants; it is the audit. Grants made later without a rerun are not detected. Bootstrap revokes PUBLIC access to the schema, tables and
|
||||
@@ -145,6 +146,27 @@ receives clones. `evo-world-clone audit` verifies a region's whole retained
|
||||
history; it is read-only and needs only runtime read access. Never point a clone
|
||||
target at a production database or World0.
|
||||
|
||||
Schema v8 (ADR-0068) binds authority to builds:
|
||||
- Hosts from M7.9b onwards acquire with their build identity. Only a retained
|
||||
build that has not been retired may hold a lease.
|
||||
- No new commit may name a retired build (EVL06). History written by a retired
|
||||
build stays recoverable, so keep it retained.
|
||||
- Hosts built before M7.9b use build-less acquisition, which keeps working until
|
||||
the first barrier.
|
||||
|
||||
To upgrade the build:
|
||||
1. Migrate the schema. Running hosts keep their leases.
|
||||
2. Insert the new build into `retained_builds`.
|
||||
3. Deploy hosts with `--build <new> --retained <old>`.
|
||||
4. On an owner connection, run
|
||||
`SELECT evolution.upgrade_barrier('\x<old build>');`
|
||||
It retires the old build and fences every current holder in the database. It
|
||||
returns the number of leases fenced, and refuses to retire the last current
|
||||
build.
|
||||
|
||||
Old images then quarantine (exit 4) instead of serving. Rules and format changes
|
||||
are refused explicitly; there is no converter.
|
||||
|
||||
There is no operator CLI for provisioning original regions yet, and no real world
|
||||
has been provisioned. Migrating v2→v3 fails closed if any v2 head exists, because v2 heads
|
||||
have no payload.
|
||||
|
||||
Reference in New Issue
Block a user