neils-dev commented on PR #4222:
URL: https://github.com/apache/ozone/pull/4222#issuecomment-1414762234

   > I think it would be better to return early from `processNodeReport`, 
ideally only in `ReconNodeManager`.
   
   Thanks @adoroszlai.  I looked at the occurrence more closely.  This problem 
arises when recon is restart after in service with datanodes registered with 
it.  On restart, the datanode looks up the nodes it recorded in its table and 
proceeds to register each node with its stored `datanodeDetails` and _null_ 
`nodeReport`. 
   
https://github.com/apache/ozone/blob/9fba172b3f20987dbe5c7cf0bc3c712549b171d5/hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconNodeManager.java#L109
   
   It looks like the least intrusive way to avoid the NPE is an early check and 
return within the `SCMNodeManager.processNodeReport`.  Thoughts?
   


-- 
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]


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

Reply via email to