deepthi912 commented on code in PR #16165:
URL: https://github.com/apache/pinot/pull/16165#discussion_r2162586619


##########
pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java:
##########
@@ -525,7 +532,27 @@ public ValidDocIdsBitmapResponse downloadValidDocIdsBitmap(
             String.format("Table %s segment %s is not a immutable segment", 
tableNameWithType, segmentName),
             Response.Status.BAD_REQUEST);
       }
-
+      ServiceStatus.Status status = 
ServiceStatus.getServiceStatus(_instanceId);
+      String serverStatus = "";
+      if (status.equals(ServiceStatus.Status.GOOD)) {
+        
_serverMetrics.addMeteredGlobalValue(ServerMeter.READINESS_CHECK_OK_CALLS, 1);
+        serverStatus = "OK";
+      } else {
+        serverStatus = "NOT_READY";
+      }
+      HelixAdmin helixAdmin = 
_serverInstance.getHelixManager().getClusterManagmentTool();
+      String helixClusterName = 
_serverInstance.getHelixManager().getClusterName();
+
+      TableViewsUtils.TableView externalView =
+          TableViewsUtils.getTableState(tableNameWithType, 
TableViewsUtils.EXTERNALVIEW, TableType.REALTIME, helixAdmin,
+              helixClusterName);
+      TableViewsUtils.TableView idealStateView =
+          TableViewsUtils.getTableState(tableNameWithType, 
TableViewsUtils.IDEALSTATE, TableType.REALTIME, helixAdmin,
+              helixClusterName);
+

Review Comment:
   Updated and removed the segment status, in executor we are checking for 
IDEAL STATE previously, changed to check EXTERNAL VIEW in generator logic as 
well 



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