saurabhd336 commented on code in PR #11785:
URL: https://github.com/apache/pinot/pull/11785#discussion_r1359345305
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentRestletResource.java:
##########
@@ -700,19 +699,24 @@ public ServerReloadControllerJobStatusResponse
getReloadJobStatus(
serverReloadControllerJobStatusResponse.setTotalServersQueried(serverUrls.size());
serverReloadControllerJobStatusResponse.setTotalServerCallsFailed(serviceResponse._failedResponseCount);
+ // Merge all server responses.
+ List<String> pendingSegments = new ArrayList<>();
+ int successCount = 0;
for (Map.Entry<String, String> streamResponse :
serviceResponse._httpResponses.entrySet()) {
String responseString = streamResponse.getValue();
try {
ServerReloadControllerJobStatusResponse response =
JsonUtils.stringToObject(responseString,
ServerReloadControllerJobStatusResponse.class);
- serverReloadControllerJobStatusResponse.setSuccessCount(
- serverReloadControllerJobStatusResponse.getSuccessCount() +
response.getSuccessCount());
+ successCount += response.getSuccessCount();
+ pendingSegments.addAll(response.getPendingSegments());
Review Comment:
We might also need `JsonIgnoreProperties(ignoreUnknown = true)` annotation
on the class it's being deserialised into.
--
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]