Game Server Reconciliation And Transfer Marker Cleanup
Game-server reconciliation repairs Redis coordination state around active sessions, pending transfers, presence, and transfer activation markers. It is a startup/background safety loop, not the normal handoff path.
Purpose
Use this page when stale presence remains after a crash, transfer activation markers accumulate, pending transfers expire, or a restarted game server appears to own sessions it should no longer own.
Reconciliation Owner Boundary
The game server reconciles state it can prove from its local session store and current instance identity. It repairs presence for sessions it owns and prunes stale transfer activation markers that no longer correspond to live pending transfer tokens.
It does not reload handoffs from the legacy SQL table. Handoff ownership stays with control-plane Redis APIs.
Worker Cadence
Reconciliation runs from startup orchestration and can be repeated by the service loop. Failures are logged as warnings so one reconciliation failure does not stop the game server from serving active sessions.
Repeated warnings should be treated as Redis or coordination-health issues.
Expired Pending Sessions
Pending sessions and pending transfers have expiry windows. If a pending transfer expires before activation, reconciliation rolls it back and releases the associated state. Admission reservations are handled by the session store.
Transfer Activation Marker Pruning
The game server scans transfer:activated:*, extracts transfer tokens, and compares them with live pending transfer tokens. Markers for unknown or stale tokens are cleanup targets.
Do not delete all transfer markers while transfers are active; a marker can be the only confirmation that the target game server activated a transfer.
Presence Repair
Reconciliation builds expected presence records from active sessions and compares both account and character presence keys. Missing or stale records are written or removed. Presence records that target another placement are not repaired by this instance.
Control-Plane Registration Refresh
Reconciliation pairs with registration refresh. Presence can say a player is on an instance, but allocation and handoff routing still depend on fresh registry records, endpoint health, and zone allocations.
Failure Playbook
If presence is stale, compare active session snapshots with Redis presence keys. If transfer markers are stale, compare marker tokens with pending transfer tokens. If a server seems to resurrect old handoffs, confirm reconciliation is not reading legacy SQL handoff tables and that control-plane handoff APIs are the only source.