mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 23:18:44 -07:00
bb22675a91
Booting several replicas against one fresh Postgres database left all but one dead on startup: the advisory lock only covered EnsureCreated, so the seeders (system account, rooms, playlists, store, ...) raced and hit duplicate keys. Take a session-level advisory lock for the whole bootstrap and release it explicitly (pooled connections would otherwise keep it). The upgrades and seeds both providers run move into RunUpgradesAndSeedsAsync.