feat: 게임 시계 reconciliation 권위 기반 추가
This commit is contained in:
@@ -8,6 +8,8 @@ interface TryLockRow {
|
||||
|
||||
/** Serializes score/traffic writers whose table lock order otherwise differs by entry point. */
|
||||
export const GENERAL_ACCESS_PERSISTENCE_LOCK = 'general-access:persistence';
|
||||
/** Serializes phase/revision changes with every gameplay flush in one game schema. */
|
||||
export const CLOCK_OPERATION_PERSISTENCE_LOCK = 'game-clock:operation';
|
||||
|
||||
const lockKeySql = (logicalKey: string): GamePrisma.Sql =>
|
||||
GamePrisma.sql`hashtextextended(current_schema() || chr(31) || ${logicalKey}, 0)`;
|
||||
|
||||
@@ -16,6 +16,9 @@ export interface TurnEngineWorldStateRow {
|
||||
clockMode: string;
|
||||
clockWallAnchor: Date | null;
|
||||
lastTurnTick: bigint | null;
|
||||
clockPhase: string;
|
||||
clockRevision: bigint;
|
||||
deadlineGeneration: bigint;
|
||||
config: JsonValue;
|
||||
meta: JsonValue;
|
||||
updatedAt?: Date | null;
|
||||
@@ -181,6 +184,9 @@ export interface TurnEngineWorldStateUpdateInput {
|
||||
clockMode: string;
|
||||
clockWallAnchor: Date;
|
||||
lastTurnTick: bigint;
|
||||
clockPhase: string;
|
||||
clockRevision: bigint;
|
||||
deadlineGeneration: bigint;
|
||||
config: InputJsonValue;
|
||||
meta: InputJsonValue;
|
||||
}
|
||||
@@ -195,6 +201,9 @@ export interface TurnEngineWorldStateCreateInput {
|
||||
clockMode: string;
|
||||
clockWallAnchor: Date;
|
||||
lastTurnTick: bigint;
|
||||
clockPhase: string;
|
||||
clockRevision: bigint;
|
||||
deadlineGeneration: bigint;
|
||||
config: InputJsonValue;
|
||||
meta: InputJsonValue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user