dpol1 opened a new pull request, #8896:
URL: https://github.com/apache/storm/pull/8896
## Summary
Fixes #7533 — NPE in `WorkerState.transferLocalBatch` causing workers to
exit.
## Root cause
`transferLocalBatch` looks up `taskToExecutorQueue.get(tuple.dest)` and
dereferences the result without a null check. The map contains only tasks
assigned to this worker at startup. During a rebalance, peer workers with a
stale assignment cache send tuples to tasks this worker no longer owns; the
lookup returns `null` and the NPE propagates to
`StormServerHandler.exceptionCaught`, which calls
`Runtime.getRuntime().exit(1)`.
This is a regression from STORM-2306: the 1.x `transferLocal` path guarded
both lookups explicitly ("Received invalid messages for unknown tasks.
Dropping…"). The redesign dropped both guards.
## Changes
- `WorkerState.java`: null check on `queue` after line 572; on `null`, drop
the tuple, log a warning with `tuple.dest`, increment `dropCount`. Method
visibility `private` → package-private for testability.
- `WorkerStateTest.java`: new test verifying that a tuple addressed to an
unknown task is silently dropped (no exception thrown).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]