suvodeep-pyne commented on code in PR #17099:
URL: https://github.com/apache/pinot/pull/17099#discussion_r2482404392
##########
pinot-server/src/main/java/org/apache/pinot/server/api/resources/ControllerJobStatusResource.java:
##########
@@ -78,7 +91,17 @@ public String
reloadJobStatus(@PathParam("tableNameWithType") String tableNameWi
successCount++;
}
}
- return JsonUtils.objectToString(new
SegmentReloadStatusValue(totalSegmentCount, successCount));
+
+ // Query cache for failure count if reloadJobId is provided
+ Long failureCount = null;
+ if (reloadJobId != null) {
+ ReloadJobStatus jobStatus =
_serverReloadJobStatusCache.getJobStatus(reloadJobId);
+ if (jobStatus != null) {
+ failureCount = (long) jobStatus.getFailureCount();
+ }
+ }
+
+ return JsonUtils.objectToString(new
SegmentReloadStatusValue(totalSegmentCount, successCount, failureCount));
Review Comment:
yes. The current logic uses a timestamp based heuristic and can be
misleading. Goal is to track this by id instead of by timestamp.
The plan is to add the failure visibility first before refactoring success
counts, etc.
--
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]