Commit 60eec82
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 60eec82
File tree
2 files changed
+7
-14
lines changed- src/Foundatio.AWS/Messaging
- tests/Foundatio.AWS.Tests/Messaging
2 files changed
+7
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
175 | 174 | | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
194 | 187 | | |
195 | 188 | | |
196 | 189 | | |
| |||
| 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