Commit d7c6bd8
committed
Patch unsafe producer map access
While doing a little work on #1235, my LLM flagged that the way that
we're accessing `producersByQueueName` today is already a little unsafe
as it may be read in multiple places concurrently. There's a mutex to
protect it somewhat in the `QueueBundle`, but it may still race between
a change there a "notify producer" send.
Here, add one additional `RWMutex` that makes sure to synchronize read
access on the map.1 parent 6b98fb9 commit d7c6bd8
2 files changed
Lines changed: 24 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
| 639 | + | |
639 | 640 | | |
640 | 641 | | |
641 | 642 | | |
| |||
1959 | 1960 | | |
1960 | 1961 | | |
1961 | 1962 | | |
1962 | | - | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
| 1970 | + | |
1963 | 1971 | | |
1964 | 1972 | | |
1965 | 1973 | | |
| |||
2169 | 2177 | | |
2170 | 2178 | | |
2171 | 2179 | | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
2172 | 2183 | | |
2173 | 2184 | | |
2174 | 2185 | | |
| |||
2722 | 2733 | | |
2723 | 2734 | | |
2724 | 2735 | | |
2725 | | - | |
| 2736 | + | |
| 2737 | + | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
2726 | 2744 | | |
2727 | 2745 | | |
2728 | 2746 | | |
| |||
0 commit comments