Commit 3688c49
committed
Execute message-append interrupt as a separate command to avoid lock contention
Routing single appends through AppendMessages merged the INSERT and the
interrupt UPDATE into one command/connection in the SqlServer and MariaDB
stores. Holding the insert's locks while the interrupt UPDATE ran deadlocked
tight message-exchange loops (ping-pong) where two executing flows interrupt
each other - SQL Server's unbounded lock-wait made it hang indefinitely.
Execute the interrupt as a separate command after the insert (matching the
previous append-then-schedule design). PostgreSQL already runs them as
separate auto-committing batch commands and is unaffected.1 parent 0fa440b commit 3688c49
2 files changed
Lines changed: 17 additions & 10 deletions
File tree
- Stores
- MariaDB/Cleipnir.ResilientFunctions.MariaDB
- SqlServer/Cleipnir.ResilientFunctions.SqlServer
Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | 61 | | |
64 | | - | |
65 | 62 | | |
66 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
67 | 72 | | |
68 | 73 | | |
69 | 74 | | |
| |||
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
| 78 | + | |
81 | 79 | | |
82 | 80 | | |
83 | 81 | | |
| |||
88 | 86 | | |
89 | 87 | | |
90 | 88 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
95 | 97 | | |
96 | 98 | | |
97 | 99 | | |
| |||
0 commit comments