M12.3: publish and recover durable exact populations
Foundation / checks (ecs) (push) Successful in 2m41s
Foundation / checks (tsan) (push) Failing after 18m12s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (network) (push) Canceled after 20m41s
Foundation / checks (postgres) (push) Canceled after 20m43s
Foundation / checks (checks) (push) Canceled after 20m49s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (client) (push) Failing after 17m4s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / checks (ecs) (push) Successful in 2m41s
Foundation / checks (tsan) (push) Failing after 18m12s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (network) (push) Canceled after 20m41s
Foundation / checks (postgres) (push) Canceled after 20m43s
Foundation / checks (checks) (push) Canceled after 20m49s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (client) (push) Failing after 17m4s
Foundation / postgres-tools (push) Canceled after 0s
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
#pragma once
|
||||
|
||||
#include "evo/persistence/checkpoint_store.hpp"
|
||||
|
||||
namespace evo::persistence {
|
||||
struct PopulationPreparedCommit {
|
||||
RegionKey key{};
|
||||
Uuid commit{};
|
||||
std::vector<std::uint8_t> manifest, trace; // Empty trace means a profile transition.
|
||||
};
|
||||
struct PopulationPublicationFailure {
|
||||
PublicationError kind{};
|
||||
LeaseStoreFailure store{};
|
||||
ObjectError object{};
|
||||
PopulationPreparedCommit prepared;
|
||||
};
|
||||
struct RecoveredPopulationCheckpoint {
|
||||
CommittedCheckpoint committed;
|
||||
CheckpointManifest manifest;
|
||||
std::unique_ptr<server::CellularPopulation> state;
|
||||
};
|
||||
// Explicit no-tick transitions, under the same lease/head fence as publication.
|
||||
[[nodiscard]] std::expected<CommittedCheckpoint, PopulationPublicationFailure>
|
||||
migrate_cellular_to_population(Postgres&, const FilesystemObjectStore&, const LeaseGrant&,
|
||||
const CommittedCheckpoint&, Uuid commit, const Sha256Digest& build,
|
||||
server::CellularTierPolicy, std::chrono::milliseconds timeout,
|
||||
const PublishHooks& hooks = {});
|
||||
[[nodiscard]] std::expected<CommittedCheckpoint, PopulationPublicationFailure>
|
||||
materialize_population_profile(Postgres&, const FilesystemObjectStore&, const LeaseGrant&,
|
||||
const CommittedCheckpoint&, Uuid commit, const Sha256Digest& build,
|
||||
std::chrono::milliseconds timeout, const PublishHooks& hooks = {});
|
||||
[[nodiscard]] std::expected<CommittedCheckpoint, PopulationPublicationFailure>
|
||||
publish_population_batch(Postgres&, const FilesystemObjectStore&, const LeaseGrant&,
|
||||
const CommittedCheckpoint&, const server::CellularPopulationBatch&,
|
||||
const server::CellularPopulation& candidate, Uuid commit,
|
||||
const Sha256Digest& build, std::chrono::milliseconds timeout,
|
||||
const PublishHooks& hooks = {});
|
||||
[[nodiscard]] std::expected<CommittedCheckpoint, PopulationPublicationFailure>
|
||||
retry_population_prepared(Postgres&, const PopulationPreparedCommit&,
|
||||
std::chrono::milliseconds timeout);
|
||||
[[nodiscard]] std::expected<ResolvedCommit, LeaseStoreFailure>
|
||||
resolve_population_prepared(Postgres&, const PopulationPreparedCommit&,
|
||||
std::chrono::milliseconds timeout);
|
||||
[[nodiscard]] std::expected<RecoveredPopulationCheckpoint, RecoveryFailure>
|
||||
recover_population_checkpoint(Postgres&, const FilesystemObjectStore&, RegionKey, const LeaseGrant&,
|
||||
std::span<const Sha256Digest> retained_builds,
|
||||
std::chrono::milliseconds timeout);
|
||||
// Used by raw cellular recovery after a population -> individual profile transition.
|
||||
[[nodiscard]] std::expected<void, RecoveryFailure>
|
||||
verify_population_profile_transition(Postgres&, const FilesystemObjectStore&, const LeaseGrant&,
|
||||
const CommittedCheckpoint&, const CheckpointManifest&,
|
||||
std::span<const std::uint8_t> payload,
|
||||
std::chrono::milliseconds timeout);
|
||||
} // namespace evo::persistence
|
||||
Reference in New Issue
Block a user