M12.4: atomically publish and recover biological migration pairs
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m21s
Foundation / checks (network) (push) Successful in 20m51s
Foundation / checks (client) (push) Successful in 22m2s
Foundation / checks (tsan) (push) Successful in 22m59s
Foundation / checks (postgres) (push) Successful in 53m40s
Foundation / checks (checks) (push) Successful in 1h7m19s
Foundation / postgres-tools (push) Successful in 29s
Foundation / server-image (push) Successful in 38s
Foundation / image (push) Successful in 4m31s

This commit is contained in:
dingo
2026-10-18 10:02:55 -04:00
parent 0515702964
commit 0f071f3f8b
21 changed files with 1116 additions and 31 deletions
+30 -6
View File
@@ -495,12 +495,15 @@ void CellularRegionHost::reconcile_migration_freeze() {
++status_.unknown_outcomes;
return;
}
authority_.fence();
status_.phase = result.error().kind == LeaseStoreError::fenced ? HostPhase::acquiring
: HostPhase::quarantined;
state_.reset();
committed_.reset();
return;
if (result.error().kind != LeaseStoreError::commit_conflict) {
authority_.fence();
status_.phase = result.error().kind == LeaseStoreError::fenced
? HostPhase::acquiring
: HostPhase::quarantined;
state_.reset();
committed_.reset();
return;
}
}
migration_abort_.reset();
}
@@ -534,6 +537,27 @@ void CellularRegionHost::reconcile_migration_freeze() {
}
migration_frozen_ = staged->has_value();
}
if (!migration_frozen_) {
migration_reload_ = true;
const auto head =
persistence::load_region_checkpoint(*db_, config_.key, config_.lease.commit_timeout);
if (!head) {
db_.reset();
++status_.store_failures;
return;
}
if (!committed_ || head->head != committed_->head) {
// Pointer release alone cannot resume the old owner. A paired commit
// changed this head; recover and verify its shared receipt first.
if (!recover_state(*grant) || !committed_)
return;
status_.simulated_tick = committed_->head.end_tick;
status_.committed_tick = committed_->head.end_tick;
status_.committed_sequence = committed_->head.sequence;
interval_reload_ = population_mode();
mutations_uncertain_ = true;
}
}
migration_reload_ = false;
}