PrachiKhobragade commented on code in PR #8911:
URL: https://github.com/apache/pinot/pull/8911#discussion_r899651231
##########
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) {
+ // case: no immutable segments, no metric emitted
+ LOGGER.warn("Request {} queried no consuming or online segments, with
minConsumingFreshnessTimeMs: {}", requestId,
Review Comment:
shouldn't it be warn because this block shouldn't reach in happy-path,
something is wrong here
--
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]