maytasm opened a new pull request #9610: Fix NPE in RemoteTaskRunner event 
handler causes JVM shutdown
URL: https://github.com/apache/druid/pull/9610
 
 
   Fix NPE in RemoteTaskRunner event handler causes JVM shutdown
   
   ### Description
   
   An overlord can encountered the following NPE and subsequently triggered a 
JVM shutdown:
   
   ```
   java.lang.NullPointerException: null
   at 
org.apache.druid.indexing.overlord.RemoteTaskRunner.lambda$addWorker$4(RemoteTaskRunner.java:1070)
 
   ```
   ```
   This is in the following code reproduced below:
   catch (Exception e) {
   log.makeAlert(e, "Failed to handle new worker status")
   .addData("worker", zkWorker.getWorker().getHost())
   .addData("znode", event.getData().getPath())
   .emit();
   }
   ```
   
   This method needs a null check for `event.getData()`, since data can be 
null: 
https://curator.apache.org/apidocs/org/apache/curator/framework/recipes/cache/PathChildrenCacheEvent.html
   Also, added null checks for other parameters just to be safe.
   
   Also updated the version of Curator to 4.3.0. Note that Curator version 
4.3.0 has the fix for https://github.com/apache/druid/pull/8177 which earlier 
(before 4.3.0 exist) prevent us upgrading Curator's version.
   
   This PR has:
   - [x] been self-reviewed.
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked 
related entities via Javadoc links.
   - [x] added or updated version, license, or notice information in 
[licenses.yaml](https://github.com/apache/druid/blob/master/licenses.yaml)
   - [ ] added comments explaining the "why" and the intent of the code 
wherever would not be obvious for an unfamiliar reader.
   - [x] added unit tests or modified existing tests to cover new code paths.
   - [ ] added integration tests.
   - [x] been tested in a test Druid cluster.
   
   

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to