Route cellular logins to existing life owners
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 39s
Foundation / checks (ecs) (push) Successful in 2m1s
Foundation / checks (tsan) (push) Canceled after 0s
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 22s
Foundation / checks (network) (push) Canceled after 1m58s
Foundation / checks (client) (push) Canceled after 2m39s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (checks) (push) Failing after 39s
Foundation / checks (ecs) (push) Successful in 2m1s
Foundation / checks (tsan) (push) Canceled after 0s
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 22s
Foundation / checks (network) (push) Canceled after 1m58s
Foundation / checks (client) (push) Canceled after 2m39s
This commit is contained in:
@@ -186,6 +186,12 @@ class ControlLedger {
|
||||
virtual ~ControlLedger() = default;
|
||||
[[nodiscard]] virtual std::expected<ControlLease, ControlLedgerError>
|
||||
claim(const AccountId& account, std::uint64_t serial, std::uint64_t session) = 0;
|
||||
// Optional M11 lookup, called before claim() when the host has an operator-provisioned
|
||||
// life-owner route catalog. Implementations without durable life reservations fail closed.
|
||||
[[nodiscard]] virtual std::expected<std::optional<std::uint64_t>, ControlLedgerError>
|
||||
primitive_life_owner(const AccountId&) {
|
||||
return std::unexpected(ControlLedgerError::unavailable);
|
||||
}
|
||||
[[nodiscard]] virtual std::expected<std::chrono::milliseconds, ControlLedgerError>
|
||||
renew(const AccountId& account, std::uint64_t generation) = 0;
|
||||
virtual void release(const AccountId& account, std::uint64_t generation) = 0;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
#include "evo/network/session_control.hpp"
|
||||
#include "evo/persistence/account_control_store.hpp"
|
||||
#include "evo/persistence/life_reservation_store.hpp"
|
||||
#include "evo/server/pg_slot.hpp"
|
||||
#include <chrono>
|
||||
#include <functional>
|
||||
@@ -22,6 +23,8 @@ class PostgresControlLedger final : public network::ControlLedger {
|
||||
: db_{&db}, key_{key}, lease_{std::move(lease)}, duration_{duration}, timeout_{timeout} {}
|
||||
[[nodiscard]] std::expected<network::ControlLease, network::ControlLedgerError>
|
||||
claim(const network::AccountId& account, std::uint64_t serial, std::uint64_t session) override;
|
||||
[[nodiscard]] std::expected<std::optional<std::uint64_t>, network::ControlLedgerError>
|
||||
primitive_life_owner(const network::AccountId& account) override;
|
||||
[[nodiscard]] std::expected<std::chrono::milliseconds, network::ControlLedgerError>
|
||||
renew(const network::AccountId& account, std::uint64_t generation) override;
|
||||
void release(const network::AccountId& account, std::uint64_t generation) override;
|
||||
|
||||
@@ -59,6 +59,11 @@ struct HandoffKey {
|
||||
std::uint32_t key_id{};
|
||||
network::GrantPublicKey public_key{};
|
||||
};
|
||||
// Operator-provisioned destination for a durable primitive life. This world catalog is
|
||||
// independent of physical neighbours and is consulted only before a grant claims control.
|
||||
struct LifeOwnerRoute {
|
||||
network::RegionAddress address;
|
||||
};
|
||||
struct RegionSessionsConfig {
|
||||
network::quic::ServerConfig transport;
|
||||
network::ControlConfig control; // `epoch` is the initial ownership epoch.
|
||||
@@ -70,6 +75,9 @@ struct RegionSessionsConfig {
|
||||
// claim, waits out another region's control before Welcome, renews every
|
||||
// `renew_interval` and closes before its control can lapse (`safety_margin`).
|
||||
network::ControlLedger* ledger{};
|
||||
// When present, every entry must be supplied by the operator, including this region.
|
||||
// A life in another region is redirected before durable control can move here.
|
||||
std::vector<LifeOwnerRoute> life_owner_routes;
|
||||
std::chrono::milliseconds renew_interval{5000}, safety_margin{2000};
|
||||
network::IntentLimits intents{}; // max_sessions follows control.max_sessions.
|
||||
// Durable action records (10.4b), owned by the host; null keeps outcomes in memory only.
|
||||
@@ -157,8 +165,8 @@ class RegionSessions {
|
||||
const network::Perceives& perceives = {});
|
||||
// V8 reliable cellular perception is unicast to the current established session
|
||||
// for the supplied authenticated account. Empty views clear that owner's stale view.
|
||||
[[nodiscard]] bool send_cellular_perception(
|
||||
const network::AccountId& account, const network::CellularPerception& perception);
|
||||
[[nodiscard]] bool send_cellular_perception(const network::AccountId& account,
|
||||
const network::CellularPerception& perception);
|
||||
void clear_cellular_perceptions(std::uint64_t tick);
|
||||
[[nodiscard]] network::ReplicationStats replication_stats() const;
|
||||
// M10.9a (ADR-0097): the host's load governor output. While `refuse_logins`, a Hello
|
||||
|
||||
Reference in New Issue
Block a user