M12.6: derive replayed census history from immutable commits
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (ecs) (push) Successful in 2m25s
Foundation / checks (network) (push) Successful in 20m50s
Foundation / checks (client) (push) Successful in 22m7s
Foundation / checks (tsan) (push) Successful in 24m42s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 35m33s
Foundation / checks (checks) (push) Canceled after 35m43s
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (ecs) (push) Successful in 2m25s
Foundation / checks (network) (push) Successful in 20m50s
Foundation / checks (client) (push) Successful in 22m7s
Foundation / checks (tsan) (push) Successful in 24m42s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 35m33s
Foundation / checks (checks) (push) Canceled after 35m43s
This commit is contained in:
@@ -248,12 +248,13 @@ verify_population_profile_transition(Postgres& db, const FilesystemObjectStore&
|
||||
return fail(RecoveryError::unsupported);
|
||||
return {};
|
||||
}
|
||||
namespace {
|
||||
std::expected<RecoveredPopulationCheckpoint, RecoveryFailure>
|
||||
recover_population_checkpoint(Postgres& db, const FilesystemObjectStore& objects, RegionKey key,
|
||||
const LeaseGrant& lease,
|
||||
std::span<const Sha256Digest> retained_builds, milliseconds timeout) {
|
||||
recover_population_loaded(Postgres& db, const FilesystemObjectStore& objects, RegionKey key,
|
||||
const LeaseGrant& lease, std::span<const Sha256Digest> retained_builds,
|
||||
milliseconds timeout,
|
||||
std::expected<CommittedCheckpoint, LeaseStoreFailure> committed) {
|
||||
const auto fail = [](RecoveryError kind) { return std::unexpected(RecoveryFailure{kind, {}}); };
|
||||
auto committed = load_region_checkpoint(db, key, timeout);
|
||||
if (!committed)
|
||||
return std::unexpected(
|
||||
RecoveryFailure{committed.error().kind == LeaseStoreError::not_provisioned
|
||||
@@ -319,4 +320,19 @@ recover_population_checkpoint(Postgres& db, const FilesystemObjectStore& objects
|
||||
}
|
||||
return RecoveredPopulationCheckpoint{std::move(*committed), *m, std::move(*population)};
|
||||
}
|
||||
} // namespace
|
||||
std::expected<RecoveredPopulationCheckpoint, RecoveryFailure>
|
||||
recover_population_checkpoint(Postgres& db, const FilesystemObjectStore& objects, RegionKey key,
|
||||
const LeaseGrant& lease,
|
||||
std::span<const Sha256Digest> retained_builds, milliseconds timeout) {
|
||||
return recover_population_loaded(db, objects, key, lease, retained_builds, timeout,
|
||||
load_region_checkpoint(db, key, timeout));
|
||||
}
|
||||
std::expected<RecoveredPopulationCheckpoint, RecoveryFailure>
|
||||
recover_population_commit(Postgres& db, const FilesystemObjectStore& objects, RegionKey key,
|
||||
std::uint64_t sequence, const LeaseGrant& lease,
|
||||
std::span<const Sha256Digest> retained_builds, milliseconds timeout) {
|
||||
return recover_population_loaded(db, objects, key, lease, retained_builds, timeout,
|
||||
load_region_commit(db, key, sequence, timeout));
|
||||
}
|
||||
} // namespace evo::persistence
|
||||
|
||||
Reference in New Issue
Block a user