M12.7: require registered regions in census snapshots
Foundation / checks (deploy) (push) Successful in 58s
Foundation / checks (ecs) (push) Successful in 2m36s
Foundation / checks (network) (push) Successful in 20m56s
Foundation / checks (client) (push) Successful in 22m19s
Foundation / checks (tsan) (push) Successful in 25m18s
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 44m49s
Foundation / checks (postgres) (push) Canceled after 44m54s
Foundation / checks (deploy) (push) Successful in 58s
Foundation / checks (ecs) (push) Successful in 2m36s
Foundation / checks (network) (push) Successful in 20m56s
Foundation / checks (client) (push) Successful in 22m19s
Foundation / checks (tsan) (push) Successful in 25m18s
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 44m49s
Foundation / checks (postgres) (push) Canceled after 44m54s
This commit is contained in:
@@ -21,13 +21,40 @@ struct CellularCensusSnapshot {
|
||||
std::vector<CommittedCheckpoint> cuts; // Sorted regions, exact captured head/manifest pairs.
|
||||
server::CellularCensusSet census;
|
||||
};
|
||||
enum class CellularSnapshotError : std::uint8_t { invalid_request, transaction, history, census };
|
||||
enum class CellularSnapshotError : std::uint8_t {
|
||||
invalid_request,
|
||||
transaction,
|
||||
history,
|
||||
census,
|
||||
coverage
|
||||
};
|
||||
struct RegisteredCellularRegion {
|
||||
std::uint64_t region{}, frame{};
|
||||
bool operator==(const RegisteredCellularRegion&) const = default;
|
||||
};
|
||||
enum class CellularCoverageError : std::uint8_t {
|
||||
store,
|
||||
unknown_world,
|
||||
bounds,
|
||||
regions,
|
||||
frame,
|
||||
malformed
|
||||
};
|
||||
struct CellularCoverageFailure {
|
||||
CellularCoverageError kind{};
|
||||
PgFailure cause{}; // Meaningful for store.
|
||||
};
|
||||
struct RegisteredCellularCensusSnapshot {
|
||||
std::vector<RegisteredCellularRegion> catalog; // Exact registry view used for head selection.
|
||||
CellularCensusSnapshot snapshot;
|
||||
};
|
||||
struct CellularSnapshotFailure {
|
||||
CellularSnapshotError kind{};
|
||||
std::uint64_t region{}; // Failed region, or zero for a request/transaction/set error.
|
||||
PgFailure transaction{}; // Meaningful for transaction.
|
||||
CellularHistoryFailure history{}; // Meaningful for history.
|
||||
server::CellularCensusSetError census{}; // Meaningful for census.
|
||||
CellularCoverageFailure coverage{}; // Meaningful for coverage.
|
||||
};
|
||||
// Test/fault seam after each head has been captured (zero-based request index).
|
||||
// Production callers pass nothing. A throwing hook closes the capture connection.
|
||||
@@ -47,4 +74,16 @@ load_cellular_census_snapshot(Postgres&, std::uint64_t world,
|
||||
std::span<const Sha256Digest> retained_builds,
|
||||
std::chrono::milliseconds timeout,
|
||||
const CellularCensusSnapshotHooks& hooks = {});
|
||||
// Schema 50: require resources for EVERY registered region of this world,
|
||||
// including expired/released holders and regions with unavailable checkpoints.
|
||||
// Capture the registry and all heads in the SAME short database snapshot.
|
||||
// Empty/over-bound registries or any coverage/frame mismatch fail, never zero.
|
||||
// Completeness is only for registered regions of this connected database view;
|
||||
// no external branch identity, other viable-store reconciliation or extinction.
|
||||
[[nodiscard]] std::expected<RegisteredCellularCensusSnapshot, CellularSnapshotFailure>
|
||||
load_registered_cellular_census_snapshot(Postgres&, std::uint64_t world,
|
||||
std::span<const CellularCensusRegionRequest>,
|
||||
std::span<const Sha256Digest> retained_builds,
|
||||
std::chrono::milliseconds timeout,
|
||||
const CellularCensusSnapshotHooks& hooks = {});
|
||||
} // namespace evo::persistence
|
||||
|
||||
Reference in New Issue
Block a user