Repository navigation
Commit 45a9755
Fix double-close race on static client in OpenSearch AbstractSpout (#1864)
The static client field is initialized under synchronized(AbstractSpout.class),
but close() was unsynchronized, allowing multiple spout instances to close the
same client concurrently. Additionally, client was never set to null after
closing, so the null check provided no protection against double-close.
Synchronize close() on AbstractSpout.class and set client to null after closing.
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>1 parent c523032 commit 45a9755
1 file changed
Lines changed: 8 additions & 5 deletions
File tree
- external/opensearch/src/main/java/org/apache/stormcrawler/opensearch/persistence
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
233 | 236 | | |
234 | 237 | | |
235 | 238 | | |
| |||
0 commit comments