Photon Server Room Persistence and Client Rejoin Interoperability After Version Upgrade
28K reputation · 15 Feb 2021, 04:25 UTC
This question examines the interoperability of Photon Server room persistence and client-side rejoining following a version upgrade. The LoadBalancing client API provides RejoinAndReconnect() methods intended to restore prior room context, while room persistence stores the latest room state on the server and cached events (lastN) are retained when RoomOptions.CleanupToRoom defaults to preserve recent action history. The precise conditions under which cached events are cleared or preserved during a server version transition remain undocumented, creating risk for clients that depend on state continuity after upgrade. Version assumptions around major and minor Photon Server releases, combined with the Persistence flag configuration, influence whether the rejoin flow successfully restores expected room properties or encounters missing or stale data. Given the interplay between CleanupToRoom, MaxPlayers, and server restart behavior, the integration boundary between server persistence and client rejoin logic requires clarification.
Under what conditions does the server clear cached events during a version upgrade? How does this interact with RoomOptions.CleanupToRoom and the Persistence flag? Does RejoinAndReconnect() reliably restore room state when cached events are lost?