접속 집계 교착으로 인한 턴 정지를 방지

This commit is contained in:
2026-09-03 01:58:45 +00:00
parent 97a8b1daef
commit 1a2c7ba775
7 changed files with 48 additions and 10 deletions
@@ -6,6 +6,9 @@ interface TryLockRow {
acquired: boolean;
}
/** Serializes score/traffic writers whose table lock order otherwise differs by entry point. */
export const GENERAL_ACCESS_PERSISTENCE_LOCK = 'general-access:persistence';
const lockKeySql = (logicalKey: string): GamePrisma.Sql =>
GamePrisma.sql`hashtextextended(current_schema() || chr(31) || ${logicalKey}, 0)`;