Commit 30a57dd
Content Publishing: Fix deadlocks by acquiring WriteLock at outer scope (#21105)
fix: add write lock at outer scope to prevent deadlocks in content publishing
Acquire a write lock on ContentTree at the start of PublishAsync to prevent
deadlocks. Previously, inner scopes would acquire read locks first (via
repository operations), then attempt to upgrade to write locks, causing
deadlocks when multiple transactions tried this simultaneously.
By acquiring the write lock at the outer scope, we ensure consistent lock
ordering and prevent the deadlock scenario.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.5 <[email protected]>1 parent 3fa053a commit 30a57dd
1 file changed
+1
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
| |||
0 commit comments