dasahcc commented on a change in pull request #360: Remove TODO NPE log for 
computeResourceBestPossibleState
URL: https://github.com/apache/helix/pull/360#discussion_r307024152
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/controller/stages/BestPossibleStateCalcStage.java
 ##########
 @@ -250,6 +250,12 @@ private boolean 
computeResourceBestPossibleState(ClusterEvent event, ResourceCon
         // The next release will support rebalancers that compute the mapping 
from start to finish
         partitionStateAssignment = mappingCalculator
             .computeBestPossiblePartitionState(cache, idealState, resource, 
currentStateOutput);
+
+        if (partitionStateAssignment == null) {
+          LogUtil.logError(logger, _eventId, "PartitionStateAssignment is 
null.");
 
 Review comment:
   Let's use warning instead of error, since it is not a critical failure. Also 
please add the resource name in the message, otherwise, we may not know which 
resource has this problem.

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

Reply via email to