fix(cellular): one action per account a tick, never a refused tick
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / postgres-tools (push) Successful in 1m39s
Foundation / server-image (push) Successful in 5m19s
Foundation / image (push) Successful in 6m54s
Foundation / checks (client) (push) Successful in 4s
Foundation / checks (checks) (push) Successful in 4s
Foundation / checks (ecs) (push) Successful in 4s
Foundation / checks (network) (push) Successful in 4s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (postgres) (push) Successful in 4s
Foundation / checks (tsan) (push) Successful in 4s
Foundation / postgres-tools (push) Successful in 1m39s
Foundation / server-image (push) Successful in 5m19s
Foundation / image (push) Successful in 6m54s
Region 16 playtest: a bud showed and was then undone, and several buds were
refused. The client scheduled a discrete action at server tick + lead, but
movement runs ahead of that once the lead shrinks (each movement takes the
tick after the last one sent), so a bud could name a tick a movement already
had. A tick takes one action per account: the region refused the whole tick
and dropped every player's actions on it ("tick stalled ... error=4").
- Server: keep_one_action_per_account keeps each account's discrete action
(engulf, bud, become, emerge), else its newest, and refuses only the rest.
- Client: a discrete action is scheduled after every tick already sent, and
movement is held off the tick a queued discrete action owns.
- Failed background commits now log their category, publication error,
store error and SQLSTATE (never server text), to diagnose ok=0 commits.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1038,6 +1038,18 @@ int serve_cellular(Options& o) {
|
||||
std::printf("cellular commit ticks=%zu ms=%lld handoff_ms=%lld ok=%d\n",
|
||||
flight_ticks, static_cast<long long>(commit_ms), flight_handoff_ms,
|
||||
*landed ? 1 : 0);
|
||||
if (!*landed) {
|
||||
// Categories and SQLSTATE only (never server text); -1 when not reported.
|
||||
const auto& failure = landed->error();
|
||||
const auto store = failure.store.value_or(persistence::LeaseStoreFailure{});
|
||||
std::printf("cellular commit failed host=%u publication=%d store=%d "
|
||||
"sqlstate=%.5s object=%d\n",
|
||||
static_cast<unsigned>(failure.kind),
|
||||
failure.publication ? static_cast<int>(*failure.publication) : -1,
|
||||
failure.store ? static_cast<int>(store.kind) : -1,
|
||||
failure.store ? store.cause.sqlstate.data() : "-",
|
||||
failure.object ? static_cast<int>(*failure.object) : -1);
|
||||
}
|
||||
if (*landed) {
|
||||
host.refuse_births(flight_refusals);
|
||||
flight_actions.clear();
|
||||
@@ -1325,6 +1337,10 @@ int serve_cellular(Options& o) {
|
||||
});
|
||||
bridge->dropped(departed, true);
|
||||
}
|
||||
// One action per account a tick; a second would refuse the whole tick.
|
||||
if (const auto superseded = server::keep_one_action_per_account(actions);
|
||||
!superseded.empty())
|
||||
bridge->dropped(superseded, true);
|
||||
if (!batch_builder) {
|
||||
auto created = server::CellularSessionBatchBuilder::create(
|
||||
*state, host.committed()->head);
|
||||
|
||||
Reference in New Issue
Block a user