SyncPlay cannot work across replicas #17
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context: multi-replica stateless deployment (two 2-replica apps,
cheeztvandfafflix, each one PostgreSQL plus valkey, no sticky sessions). Not a 12.0 regression — live in the deployed build. Tracking: #12.Problem
Emby.Server.Implementations/SyncPlay/SyncPlayManager.cs:49,55,61holds_groups,_sessionToGroupMapand_activeUsersentirely in process, with zero persistence.Members whose clients land on different pods cannot join the same group at all — from the second pod's view the group does not exist. SyncPlay is effectively non-functional in this deployment, and which users can watch together depends on load-balancer luck.
Proposal
A shared group registry (valkey, or the database if durability across a full restart matters) plus a cross-pod message bus so playback commands reach every member's owning pod.
Largest item in this set. Depends on #16 for the session → owning-pod routing.
Acceptance
PostgreSqlTestServerintests/Jellyfin.Server.Testsand run in thepostgres-migration-chainWoodpecker step (JELLYFIN_TEST_POSTGRES). In-memory providers have hidden different semantics and are how three bugs reached production.