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:
@@ -305,6 +305,12 @@ void unrestorable_head_quarantines() {
|
||||
auto c = config(r);
|
||||
c.build = filled<32>(0xB2);
|
||||
c.retained_builds = {c.build}; // Not the build that produced the head.
|
||||
// A current build in the database (so acquisition succeeds, ADR-0068): the
|
||||
// quarantine comes from recovery refusing the head, not from the lease.
|
||||
CHECK(connect_as(env("PGUSER"))
|
||||
->query("INSERT INTO evolution.retained_builds(build_identity) VALUES "
|
||||
"(decode(repeat('b2', 32), 'hex')) ON CONFLICT DO NOTHING",
|
||||
{}, 5s));
|
||||
auto h = host<LineageRegion>(r, c);
|
||||
const auto& s = h->step(std::chrono::steady_clock::now());
|
||||
CHECK(s.phase == HostPhase::quarantined && !s.ready && h->state() == nullptr);
|
||||
|
||||
Reference in New Issue
Block a user