Add durable primitive life owner lookup
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (checks) (push) Failing after 40s
Foundation / checks (ecs) (push) Successful in 1m55s
Foundation / checks (postgres) (push) Failing after 53s
Foundation / checks (tsan) (push) Failing after 33s
Foundation / checks (network) (push) Failing after 3m1s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (client) (push) Canceled after 3m53s

This commit is contained in:
dingo
2026-10-11 01:28:24 -04:00
parent 505c424750
commit 636740bc55
10 changed files with 198 additions and 58 deletions
@@ -69,4 +69,9 @@ load_primitive_lives(Postgres& db, RegionKey key, std::chrono::milliseconds time
query_primitive_life(Postgres& db, RegionKey key, const LeaseGrant& lease, const Uuid& account,
std::uint64_t generation, std::uint64_t request_id,
std::chrono::milliseconds timeout);
// Read-only, lease-fenced lookup used before claiming durable account control.
// Returns no value when the account has no active (non-refused) life reservation.
[[nodiscard]] std::expected<std::optional<std::uint64_t>, LifeReservationFailure>
primitive_life_owner(Postgres& db, RegionKey key, const LeaseGrant& lease, const Uuid& account,
std::chrono::milliseconds timeout);
} // namespace evo::persistence