Fix M10 session window initialization
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m50s
Foundation / checks (checks) (push) Failing after 3m27s
Foundation / checks (client) (push) Failing after 9m38s
Foundation / checks (network) (push) Successful in 9m44s
Foundation / checks (tsan) (push) Successful in 7m40s
Foundation / checks (postgres) (push) Failing after 23m20s
Foundation / postgres-tools (push) Skipped
Foundation / server-image (push) Skipped
Foundation / image (push) Skipped

This commit is contained in:
aevolution-gitops-bot
2026-10-04 10:17:41 -04:00
parent 07922fe74e
commit d2423bfc04
+3 -3
View File
@@ -114,11 +114,11 @@ template <typename Host> class M10Bridge {
[[nodiscard]] bool accepting(std::uint64_t now_seconds) { [[nodiscard]] bool accepting(std::uint64_t now_seconds) {
if (!sessions_ || window_closed_) if (!sessions_ || window_closed_)
return sessions_ != nullptr && !window_closed_; return sessions_ != nullptr && !window_closed_;
if (window_.accepting(now_seconds)) if (window_ && window_->accepting(now_seconds))
return sessions_ != nullptr; return sessions_ != nullptr;
window_closed_ = true; window_closed_ = true;
sessions_->shutdown(std::chrono::steady_clock::now()); sessions_->shutdown(std::chrono::steady_clock::now());
std::printf("m10 window closed activation=%s\n", window_.activation_id().c_str()); std::printf("m10 window closed activation=%s\n", window_->activation_id().c_str());
return false; return false;
} }
void after_step() { void after_step() {
@@ -191,7 +191,7 @@ template <typename Host> class M10Bridge {
std::unique_ptr<server::PostgresControlLedger> control_; std::unique_ptr<server::PostgresControlLedger> control_;
std::unique_ptr<server::PostgresActionLedger> actions_; std::unique_ptr<server::PostgresActionLedger> actions_;
std::unique_ptr<server::RegionSessions> sessions_; // Destroyed first: uses the ledgers. std::unique_ptr<server::RegionSessions> sessions_; // Destroyed first: uses the ledgers.
server::SessionWindow window_{"disabled", 1}; std::optional<server::SessionWindow> window_;
bool window_closed_{}; bool window_closed_{};
}; };
#else #else