This is an automated email from the ASF dual-hosted git repository. jlli pushed a commit to branch check-participantHistory in repository https://gitbox.apache.org/repos/asf/pinot.git
commit ee4f075d1234fba1f824cae58be06ac5e763d060 Author: Jack Li(Analytics Engineering) <j...@jlli-mn1.linkedin.biz> AuthorDate: Tue Feb 8 17:42:59 2022 -0800 Check if participantHistory is null in isInstanceOfflineFor method --- .../apache/pinot/controller/helix/core/PinotHelixResourceManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java index 9e36e19..938422c 100644 --- a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java +++ b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/PinotHelixResourceManager.java @@ -461,6 +461,10 @@ public class PinotHelixResourceManager { return false; } ParticipantHistory participantHistory = _helixDataAccessor.getProperty(_keyBuilder.participantHistory(instanceId)); + // returns false if there is no history for this participant. + if (participantHistory == null) { + return false; + } long lastOfflineTime = participantHistory.getLastOfflineTime(); // returns false if the last offline time is a negative number. if (lastOfflineTime < 0) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org