ankitsultana commented on code in PR #15695:
URL: https://github.com/apache/pinot/pull/15695#discussion_r2071969846


##########
pinot-common/src/main/java/org/apache/pinot/common/assignment/InstancePartitions.java:
##########
@@ -119,6 +120,7 @@ public void setInstances(int partitionId, int 
replicaGroupId, List<String> insta
   }
 
   public static InstancePartitions fromZNRecord(ZNRecord znRecord) {
+    Preconditions.checkArgument(znRecord != null, "ZNRecord cannot be null");

Review Comment:
   If we are passing null here from some call site, it might be better to also 
update the call-site so it can log the relevant details and perhaps avoid the 
call itself?
   
   Seeing NPE or IllegalArgumentException doesn't really change much from a 
debuggability perspective.



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to