Jackie-Jiang commented on a change in pull request #4229: Emit freshnessLag 
metric from broker for queries hitting consuming segments
URL: https://github.com/apache/incubator-pinot/pull/4229#discussion_r286278573
 
 

 ##########
 File path: 
pinot-core/src/main/java/org/apache/pinot/core/query/reduce/BrokerReduceService.java
 ##########
 @@ -143,9 +144,13 @@ public BrokerResponseNative reduceOnDataTable(@Nonnull 
BrokerRequest brokerReque
         numConsumingSegmentsQueried += Long.parseLong(numConsumingString);
       }
 
-      String minConsumingIndexTsString = 
metadata.get(DataTable.MIN_CONSUMING_FRESHNESS_TIME_MS);
-      if (minConsumingIndexTsString != null) {
-        minConsumingFreshnessTimeMs = 
Math.min(Long.parseLong(minConsumingIndexTsString), 
minConsumingFreshnessTimeMs);
+      String minConsumingFreshnessTimeMsString = 
metadata.get(DataTable.MIN_CONSUMING_FRESHNESS_TIME_MS);
+      if (minConsumingFreshnessTimeMsString != null) {
+        long freshness = Long.parseLong(minConsumingFreshnessTimeMsString);
+        // ignore invalid values
+        if (freshness > INVALID_FRESHNESS) {
 
 Review comment:
   It can never be invalid if it exists in the metadata

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to