This is an automated email from the ASF dual-hosted git repository.

Jackie-Jiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 8f5af9ed27e Fix potential NPE in PinotHelixResourceManager tenant 
deletability checks (#18777)
8f5af9ed27e is described below

commit 8f5af9ed27e4d46c47499d8064107dd79a63da0b
Author: Akanksha kedia <[email protected]>
AuthorDate: Mon Jun 22 00:41:11 2026 +0530

    Fix potential NPE in PinotHelixResourceManager tenant deletability checks 
(#18777)
---
 .../pinot/controller/helix/core/PinotHelixResourceManager.java      | 6 ++++++
 1 file changed, 6 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 da30ef1cf4f..6833d539513 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
@@ -1534,6 +1534,9 @@ public class PinotHelixResourceManager {
     Set<String> taggedInstances = new 
HashSet<>(HelixHelper.getInstancesWithTag(_helixZkManager, brokerTag));
     String brokerName = Helix.BROKER_RESOURCE_INSTANCE;
     IdealState brokerIdealState = 
_helixAdmin.getResourceIdealState(_helixClusterName, brokerName);
+    if (brokerIdealState == null) {
+      return true;
+    }
     for (String partition : brokerIdealState.getPartitionSet()) {
       for (String instance : brokerIdealState.getInstanceSet(partition)) {
         if (taggedInstances.contains(instance)) {
@@ -1554,6 +1557,9 @@ public class PinotHelixResourceManager {
         continue;
       }
       IdealState tableIdealState = 
_helixAdmin.getResourceIdealState(_helixClusterName, resourceName);
+      if (tableIdealState == null) {
+        continue;
+      }
       for (String partition : tableIdealState.getPartitionSet()) {
         for (String instance : tableIdealState.getInstanceSet(partition)) {
           if (taggedInstances.contains(instance)) {


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

Reply via email to