You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/05/15 00:03:25 UTC

[GitHub] [incubator-pinot] mcvsubbu commented on a change in pull request #6925: Update time boundary only when segment is available on server

mcvsubbu commented on a change in pull request #6925:
URL: https://github.com/apache/incubator-pinot/pull/6925#discussion_r632864795



##########
File path: pinot-broker/src/main/java/org/apache/pinot/broker/routing/timeboundary/TimeBoundaryManager.java
##########
@@ -159,15 +160,20 @@ private void updateTimeBoundaryInfo(long maxEndTimeMs) {
    * ONLINE/CONSUMING instances in the ideal state and selected by the pre-selector).
    * <p>NOTE: We don't update all the segment ZK metadata for every external view change, but only the new added/removed
    * ones. The refreshed segment ZK metadata change won't be picked up.
-   * <p>NOTE: {@code externalView} and {@code idealState} are unused, but intentionally passed in in case they are
-   * needed in the future.
+   * <p>NOTE: {@code idealState} is unused, but intentionally passed in in case it is needed in the future.
    */
   @SuppressWarnings("unused")
   public synchronized void onExternalViewChange(ExternalView externalView, IdealState idealState,
       Set<String> onlineSegments) {
     for (String segment : onlineSegments) {
-      _endTimeMsMap.computeIfAbsent(segment, k -> extractEndTimeMsFromSegmentZKMetadataZNRecord(segment,
-          _propertyStore.get(_segmentZKMetadataPathPrefix + segment, null, AccessOption.PERSISTENT)));
+      // NOTE: Only update the segment end time when there are ONLINE/CONSUMING instances in the external view to
+      //       prevent moving the time boundary before the new segment is picked up by the servers
+      Map<String, String> instanceStateMap = externalView.getStateMap(segment);

Review comment:
       afair TimeBoundaryManager is created only for Offline tables, and they don't have any consuming segments




-- 
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:
users@infra.apache.org



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