9aman commented on code in PR #14828:
URL: https://github.com/apache/pinot/pull/14828#discussion_r1926511842
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotRealtimeTableResource.java:
##########
@@ -222,15 +221,26 @@ public JsonNode getForceCommitJobStatus(
String tableNameWithType =
controllerJobZKMetadata.get(CommonConstants.ControllerJob.TABLE_NAME_WITH_TYPE);
Set<String> consumingSegmentCommitted = JsonUtils.stringToObject(
controllerJobZKMetadata.get(CommonConstants.ControllerJob.CONSUMING_SEGMENTS_FORCE_COMMITTED_LIST),
Set.class);
- Set<String> onlineSegmentsForTable =
-
_pinotHelixResourceManager.getOnlineSegmentsFromIdealState(tableNameWithType,
false);
- Set<String> segmentsYetToBeCommitted = new HashSet<>();
- consumingSegmentCommitted.forEach(segmentName -> {
- if (!onlineSegmentsForTable.contains(segmentName)) {
- segmentsYetToBeCommitted.add(segmentName);
- }
- });
+ Set<String> segmentsToCheck;
+ String segmentsPendingToBeComittedString =
+
controllerJobZKMetadata.get(CommonConstants.ControllerJob.CONSUMING_SEGMENTS_YET_TO_BE_COMMITTED_LIST);
+
+ if (segmentsPendingToBeComittedString != null) {
+ segmentsToCheck =
JsonUtils.stringToObject(segmentsPendingToBeComittedString, Set.class);
+ } else {
+ segmentsToCheck = consumingSegmentCommitted;
+ }
+
+ Set<String> segmentsYetToBeCommitted =
Review Comment:
Does it server any other purpose ?
--
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]