Commit 43e6a5f
committed
Fix deadlock in GetOrCreateTopicArnAsync causing CI tests to hang
RCA: EnsureTopicSubscriptionAsync held _lock and called GetOrCreateTopicArnAsync
which tried to acquire the same _lock. AsyncLock is not reentrant, causing deadlock.
Fix: Remove lock from GetOrCreateTopicArnAsync since caller already holds it.
Use ConcurrentDictionary.TryAdd for thread-safe caching of topic ARNs.1 parent 29cf0f3 commit 43e6a5f
File tree
2 files changed
+11
-11
lines changed- src/Foundatio.AWS/Messaging
- tests/Foundatio.AWS.Tests/Messaging
2 files changed
+11
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 184 | + | |
| 185 | + | |
189 | 186 | | |
190 | | - | |
191 | | - | |
| 187 | + | |
| 188 | + | |
192 | 189 | | |
193 | | - | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
217 | 217 | | |
218 | 218 | | |
219 | 219 | | |
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
| 331 | + | |
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
515 | | - | |
| 515 | + | |
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
| |||
0 commit comments