timothy-e commented on code in PR #17749:
URL: https://github.com/apache/pinot/pull/17749#discussion_r2884998107
##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/realtime/IngestionDelayTracker.java:
##########
@@ -570,20 +574,38 @@ public long getPartitionEndToEndIngestionDelayMs(int
partitionId) {
*
* @param partitionId partition for which we are retrieving the delay
*
- * @return ingestion delay in milliseconds for the given partition ID.
+ * @return ingestion delay in milliseconds for the given partition ID,
+ * or null if ingestion time is not available for the partition.
*/
- public long getPartitionIngestionDelayMs(int partitionId) {
+ public Long getPartitionIngestionDelayMs(int partitionId) {
IngestionInfo ingestionInfo = _ingestionInfoMap.get(partitionId);
- long ingestionTimeMs = 0;
- if ((ingestionInfo != null) && (ingestionInfo._ingestionTimeMs > 0)) {
- ingestionTimeMs = ingestionInfo._ingestionTimeMs;
+ if (ingestionInfo == null || ingestionInfo._ingestionTimeMs < 0) {
+ return null;
Review Comment:
I'll deploy this change to a QA cluster and validate that it doesn't cause a
NPE
--
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]