Commit c558d2b
GH-1613: Fix Race in Producer Factory
Resolves #1613
Do not clear the cache in `destroy()` - just drain the producer queues instead.
Fixes a race condition where a producer could be returned to the cache between draining
the queues and clearing the map.
Just leave the queue(s) in place to accept new returns.
**cherry-pick to 2.5.x, 2.4.x, 2.3.x, 1.3.x**
(cherry picked from commit 7ad38c0)1 parent 4f5a1cf commit c558d2b
File tree
1 file changed
+0
-1
lines changed- spring-kafka/src/main/java/org/springframework/kafka/core
1 file changed
+0
-1
lines changedLines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
337 | | - | |
338 | 337 | | |
339 | 338 | | |
340 | 339 | | |
| |||
0 commit comments