mcvsubbu commented on a change in pull request #4374: Enhance the time boundary 
service to get consistent result
URL: https://github.com/apache/incubator-pinot/pull/4374#discussion_r298650114
 
 

 ##########
 File path: 
pinot-broker/src/main/java/org/apache/pinot/broker/routing/HelixExternalViewBasedTimeBoundaryService.java
 ##########
 @@ -111,25 +112,53 @@ public void updateTimeBoundaryService(ExternalView 
externalView) {
         continue;
       }
 
-      // Convert segment end time into table time unit
-      // NOTE: for now, time unit in segment ZK metadata should always match 
table time unit, but in the future we might
-      //       want to always use MILLISECONDS as the time unit in segment ZK 
metadata
-      maxTimeValue = Math.max(maxTimeValue, 
tableTimeUnit.convert(segmentEndTime, segmentZKMetadata.getTimeUnit()));
+      long segmentEndTimeMs = 
segmentZKMetadata.getTimeUnit().toMillis(segmentEndTime);
+      if (latestSegmentZKMetadata == null) {
 
 Review comment:
   `if (latestSegmentZkMetadata == null || segmentEndTimeMs > 
latestSegmentEndTimeMs)`
   works?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to