PrachiKhobragade commented on code in PR #8911:
URL: https://github.com/apache/pinot/pull/8911#discussion_r900618682


##########
pinot-core/src/main/java/org/apache/pinot/core/query/executor/ServerQueryExecutorV1Impl.java:
##########
@@ -261,12 +272,22 @@ private DataTable processQueryInternal(ServerQueryRequest 
queryRequest, Executor
       _serverMetrics.addMeteredTableValue(tableNameWithType, 
ServerMeter.NUM_MISSING_SEGMENTS, numMissingSegments);
     }
 
+    long minConsumingFreshnessTimeMs = Long.MAX_VALUE;
     if (numConsumingSegments > 0) {
-      long minConsumingFreshnessTimeMs = minIngestionTimeMs != Long.MAX_VALUE 
? minIngestionTimeMs : minIndexTimeMs;
-      LOGGER.debug("Request {} queried {} consuming segments with 
minConsumingFreshnessTimeMs: {}", requestId,
-          numConsumingSegments, minConsumingFreshnessTimeMs);
+      minConsumingFreshnessTimeMs = minIngestionTimeMs != Long.MAX_VALUE ? 
minIngestionTimeMs : minIndexTimeMs;
       metadata.put(MetadataKey.NUM_CONSUMING_SEGMENTS_PROCESSED.getName(), 
Integer.toString(numConsumingSegments));
       metadata.put(MetadataKey.MIN_CONSUMING_FRESHNESS_TIME_MS.getName(), 
Long.toString(minConsumingFreshnessTimeMs));
+      LOGGER.debug("Request {} queried {} consuming segments with 
minConsumingFreshnessTimeMs: {}", requestId,
+          numConsumingSegments, minConsumingFreshnessTimeMs);
+    } else if (numConsumingSegments == 0 && maxEndTimeMs != Long.MIN_VALUE) {
+      minConsumingFreshnessTimeMs = maxEndTimeMs;
+      metadata.put(MetadataKey.MIN_CONSUMING_FRESHNESS_TIME_MS.getName(), 
Long.toString(maxEndTimeMs));
+      LOGGER.debug("Request {} queried {} consuming segments with 
minConsumingFreshnessTimeMs: {}", requestId,
+          numConsumingSegments, minConsumingFreshnessTimeMs);
+    } else if (numOnlineSegments == 0) {

Review Comment:
   removed



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