kishorvpatil opened a new pull request #3311: URL: https://github.com/apache/storm/pull/3311
## What is the purpose of the change In refresh-connection thread, if we do get localAssignment, we try to get it from Zookeeper, if assignment is still null it suggests the worker should not exist. ## How was the change tested Manually tested this: 1. Launch topology. 2. Stop supervisor, validate that worker stays up - as it reads assignment from ZK 3. Kill topology 4. Worker suicide function recognizes null assignment and kills itself. Here is worker log after change.. ``` 2020-07-17 17:53:24.494 o.a.s.d.w.WorkerState refresh-connections-timer [WARN] Failed to read assignment. This should only happen when topology is shutting down. java.lang.RuntimeException: Failed to read worker assignment. Supervisor client threw exception, and assignment in Zookeeper was null 2020-07-17 17:53:24.503 o.a.s.d.w.WorkerState refresh-connections-timer [INFO] Assigment is null. We should not be alive! 2020-07-17 17:53:24.503 o.a.s.u.Utils refresh-connections-timer [ERROR] Halting process: Worker died java.lang.RuntimeException: Halting process: Worker died at org.apache.storm.utils.Utils.exitProcess(Utils.java:518) ~[storm-client-2.3.0.y.jar:2.3.0.y] at org.apache.storm.utils.Utils$3.run(Utils.java:870) ~[storm-client-2.3.0.y.jar:2.3.0.y] at org.apache.storm.daemon.worker.WorkerState.suicideIfLocalAssignmentsChanged(WorkerState.java:398) ~[storm-client-2.3.0.y.jar:2.3.0.y] at org.apache.storm.daemon.worker.WorkerState.refreshConnections(WorkerState.java:413) ~[storm-client-2.3.0.y.jar:2.3.0.y] at org.apache.storm.StormTimer$1.run(StormTimer.java:110) [storm-client-2.3.0.y.jar:2.3.0.y] at org.apache.storm.StormTimer$StormTimerTask.run(StormTimer.java:226) [storm-client-2.3.0.y.jar:2.3.0.y] ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org