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:
@@ -251,11 +251,11 @@ void clone_cannot_write_its_source() {
|
||||
CHECK(cloned && cloned->inherited_outcomes == 1 && cloned->origin.tick == 25 &&
|
||||
cloned->origin.sequence == before.sequence && cloned->origin.commit == before.commit);
|
||||
// The source session is read-only for good, even through SECURITY DEFINER functions.
|
||||
auto denied = acquire_region_lease(*reader, source.key, 4000ms, 5s);
|
||||
auto denied = acquire_region_lease(*reader, source.key, build(), 4000ms, 5s);
|
||||
CHECK(!denied && sqlstate(denied.error().cause) == "25006");
|
||||
// Authority over the clone is not authority over the source.
|
||||
auto runtime = connect_to(source_db(), env("EVO_PG_RUNTIME_USER"));
|
||||
auto lease = acquire_region_lease(*runtime, same_db.key, 4000ms, 5s);
|
||||
auto lease = acquire_region_lease(*runtime, same_db.key, build(), 4000ms, 5s);
|
||||
CHECK(lease);
|
||||
auto source_head = load_region_checkpoint(*runtime, source.key, 5s);
|
||||
CHECK(source_head);
|
||||
@@ -296,7 +296,7 @@ void clone_cannot_write_its_source() {
|
||||
CHECK(!rewrite && sqlstate(rewrite.error()) == "EVL09");
|
||||
// The clone database's runtime cannot reach the source database's functions.
|
||||
auto foreign = connect_to(source_db(), env("EVO_PG_CLONE_RUNTIME_USER"));
|
||||
auto crossed = acquire_region_lease(*foreign, source.key, 4000ms, 5s);
|
||||
auto crossed = acquire_region_lease(*foreign, source.key, build(), 4000ms, 5s);
|
||||
CHECK(!crossed && sqlstate(crossed.error().cause) == "42501");
|
||||
// Nothing above moved the source.
|
||||
const auto after = head_in(source_db(), source.key);
|
||||
@@ -420,7 +420,7 @@ void environmental_clone_binds_inherited_outcomes() {
|
||||
*owner_db, *source_objects, key, evo::test::region_identity.frame,
|
||||
*evo::test::region_community(), filled<16>(0xF9), build(), budget, 5s);
|
||||
CHECK(genesis);
|
||||
auto lease = acquire_region_lease(*runtime, key, 20000ms, 5s);
|
||||
auto lease = acquire_region_lease(*runtime, key, build(), 20000ms, 5s);
|
||||
CHECK(lease);
|
||||
auto state = evo::test::region_community();
|
||||
RegionBatch<evo::processes::EnvironmentalCommunity> batch{*state};
|
||||
|
||||
Reference in New Issue
Block a user