M12.4: admit and replay durable boundary-accounting upgrades
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / checks (network) (push) Successful in 21m4s
Foundation / checks (client) (push) Successful in 22m15s
Foundation / checks (tsan) (push) Successful in 23m3s
Foundation / checks (postgres) (push) Successful in 51m33s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 55m18s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 2m23s
Foundation / checks (network) (push) Successful in 21m4s
Foundation / checks (client) (push) Successful in 22m15s
Foundation / checks (tsan) (push) Successful in 23m3s
Foundation / checks (postgres) (push) Successful in 51m33s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 55m18s
This commit is contained in:
@@ -20,7 +20,7 @@ bool bound(const CommittedCheckpoint& checkpoint, const CheckpointManifest& m) {
|
||||
}
|
||||
bool canonical(const PopulationPreparedCommit& prepared, const CheckpointManifest& m) {
|
||||
if (!supported(m) || m.key != prepared.key || m.commit != prepared.commit || m.sequence == 0 ||
|
||||
m.cellular_versions != cellular_v9_versions || !encode_manifest(m))
|
||||
population_envelope_version(m.cellular_versions) == 0 || !encode_manifest(m))
|
||||
return false;
|
||||
if (prepared.trace.empty())
|
||||
return (m.profile == CheckpointProfile::cellular_lives_v1 ||
|
||||
@@ -28,7 +28,8 @@ bool canonical(const PopulationPreparedCommit& prepared, const CheckpointManifes
|
||||
m.begin_tick == m.end_tick && m.batch == BatchDigests{};
|
||||
const auto trace = server::decode_population_batch(prepared.trace);
|
||||
const auto digest = sha256(prepared.trace);
|
||||
if (!trace || !digest || trace->format_version != 1 ||
|
||||
if (!trace || !digest ||
|
||||
trace->format_version != population_envelope_version(m.cellular_versions) ||
|
||||
m.profile != CheckpointProfile::cellular_population_v1 ||
|
||||
m.batch != BatchDigests{prepared.trace.size(), *digest, 0, {}})
|
||||
return false;
|
||||
@@ -62,7 +63,7 @@ transition(Postgres& db, const FilesystemObjectStore& objects, const LeaseGrant&
|
||||
if (!previous || !previous_digest || !bound(predecessor, *previous) ||
|
||||
previous->profile != (to_population ? CheckpointProfile::cellular_lives_v1
|
||||
: CheckpointProfile::cellular_population_v1) ||
|
||||
previous->cellular_versions != cellular_v9_versions)
|
||||
population_envelope_version(previous->cellular_versions) == 0)
|
||||
return std::unexpected(failure(PublicationError::predecessor));
|
||||
auto source = objects.get({previous->payload_sha256, previous->payload_bytes});
|
||||
if (!source)
|
||||
@@ -218,8 +219,9 @@ verify_population_profile_transition(Postgres& db, const FilesystemObjectStore&
|
||||
source->commit != m.predecessor_commit ||
|
||||
predecessor->head.digest != m.predecessor_digest || source->key != m.key ||
|
||||
source->frame != m.frame || source->end_tick != m.end_tick ||
|
||||
source->cellular_versions != cellular_v9_versions ||
|
||||
m.cellular_versions != cellular_v9_versions || record.source_commit != source->commit ||
|
||||
population_envelope_version(source->cellular_versions) == 0 ||
|
||||
m.cellular_versions != source->cellular_versions ||
|
||||
record.source_commit != source->commit ||
|
||||
record.source_manifest_sha256 != predecessor->head.digest ||
|
||||
record.source_payload_sha256 != source->payload_sha256)
|
||||
return fail(RecoveryError::tail);
|
||||
@@ -274,8 +276,8 @@ recover_population_checkpoint(Postgres& db, const FilesystemObjectStore& objects
|
||||
if (!population)
|
||||
return fail(RecoveryError::payload);
|
||||
if (m->batch == BatchDigests{}) {
|
||||
if (auto verified = verify_population_profile_transition(db, objects, lease, *committed, *m,
|
||||
*bytes, timeout);
|
||||
if (auto verified = verify_cellular_no_tick_checkpoint(db, objects, lease, *committed, *m,
|
||||
*bytes, timeout);
|
||||
!verified)
|
||||
return std::unexpected(verified.error());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user