mirror of
https://github.com/PerpetualSoftware/pad.git
synced 2026-10-25 22:10:25 +00:00
a3de1bd317
CreateWorkspace locked the owner and then inserted; ImportWorkspace inserts and then locks. On Postgres a create and an import of one name for one owner formed a cycle: the create held the owner lock while waiting on the import's uncommitted slug row, and the import then asked for the owner lock. The create now inserts first and counts with pendingOwn=1, like the import, and a test builds the interleaving under lock_timeout (red with the old order: SQLSTATE 55P03). Two doc comments narrowed to what the code guarantees. Claude-Session: https://claude.ai/code/session_01BLg7wiBeSgXvAhWi23mT4Z