You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by "Jackie-Jiang (via GitHub)" <gi...@apache.org> on 2026/08/15 19:47:34 UTC
[PR] Fix NPE in HelixTaskExecutor.reset() when a task completes during shutdown [helix]
Jackie-Jiang opened a new pull request, #3168:
URL: https://github.com/apache/helix/pull/3168
### Issues
- [x] My PR addresses the following Helix issues and references them in the PR description:
Fixes #3167
### Description
- [x] Here are some details about my PR, including screenshots of any UI changes:
`HelixTaskExecutor.reset()` ends with a loop that logs tasks failing to terminate by iterating `_taskMap.keySet()` and then calling `get(taskId)`. `_taskMap` is a `ConcurrentHashMap` and message tasks remove themselves from it when they finish, so a task completing while `reset()` runs disappears between the two calls: `get` returns null and reading `info._task` throws
```
java.lang.NullPointerException: Cannot read field "_task" because "info" is null
```
which propagates out of `reset()` and can fail the participant disconnect (observed intermittently in Apache Pinot integration-test teardowns).
This change iterates `entrySet()` instead: each entry is read atomically, so a concurrently-completing task is either logged or skipped, but can never yield a null value. No behavior change for tasks genuinely still present.
### Tests
- [ ] The following tests are written for this issue:
None — the fix removes a data race in a shutdown logging loop; the race window (concurrent task completion between two map reads inside `reset()`) is not deterministically reproducible from a unit test without intrusive instrumentation.
### Commits
- My commits all reference appropriate Apache Helix GitHub issues in their subject lines and follow the commit message guidelines.
### Code Quality
- My diff has been formatted using helix-style.xml
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org
Re: [PR] Fix NPE in HelixTaskExecutor.reset() when a task completes during shutdown [helix]
Posted by "junkaixue (via GitHub)" <gi...@apache.org>.
junkaixue merged PR #3168:
URL: https://github.com/apache/helix/pull/3168
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org