(tx: DbOrTx, childWorkspaceId: string)
| 89 | * unnecessary serialization, never a correctness issue. |
| 90 | */ |
| 91 | export async function acquireForkEdgeLock(tx: DbOrTx, childWorkspaceId: string): Promise<void> { |
| 92 | await tx.execute( |
| 93 | sql`select pg_advisory_xact_lock(hashtextextended(${`fork-edge:${childWorkspaceId}`}, 0))` |
| 94 | ) |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * Serialize every promote/rollback whose TARGET is this workspace. Sibling forks |
no test coverage detected