mcvsubbu commented on a change in pull request #4374: Enhance the time boundary
service for backward-compatibility
URL: https://github.com/apache/incubator-pinot/pull/4374#discussion_r298306965
##########
File path:
pinot-broker/src/main/java/org/apache/pinot/broker/routing/HelixExternalViewBasedTimeBoundaryService.java
##########
@@ -111,25 +111,47 @@ 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()));
+ if (latestSegmentZKMetadata == null) {
+ latestSegmentZKMetadata = segmentZKMetadata;
+ } else {
+ long segmentEndTimeMs =
segmentZKMetadata.getTimeUnit().toMillis(segmentEndTime);
+ long latestSegmentEndTimeMs =
Review comment:
maybe we can compute latestSegmentEndTimeMs each time we discover a later
segment?
----------------------------------------------------------------
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]