mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-09-06 00:02:13 +00:00
`update_username_in_workpsace` locks one workspace's settings row but wrote `usr` and `usr_to_group` across every workspace holding that name, so it waited on principals another workspace's settings row guards — the deadlock the last commit closed, one workspace over. Both writes are scoped now, and the rename walks memberships in workspace order. The deferred role drop holds the settings row while it runs, so its session carries a statement timeout: the statements run on a database the workspace does not control, and a lock held there would stall every save behind it. `PgRoleInventory` is read by the enterprise planner alone, which a community build compiles without. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S5arH3G2Sa1Qqm32veJQ1n