Jackie-Jiang opened a new pull request, #18707:
URL: https://github.com/apache/pinot/pull/18707

   ## Summary
   
   `SegmentPartitionMetadataManager` hardcoded the 5-minute new-segment 
expiration window by calling the 2-arg 
`InstanceSelector.isNewSegment(creationTimeMs, currentTimeMs)` overload, which 
always used the fixed `NEW_SEGMENT_EXPIRATION_MILLIS` constant.
   
   This makes that window configurable by wiring it to the **existing** broker 
config `pinot.broker.new.segment.expiration.seconds` 
(`CONFIG_OF_NEW_SEGMENT_EXPIRATION_SECONDS`), which `InstanceSelector` already 
honors. Both the instance selector and the partition metadata manager now 
derive the new-segment window from the same config, so they stay aligned 
instead of one being fixed at 5 minutes while the other is tunable.
   
   Changes:
   - `BaseBrokerRoutingManager` reads 
`CONFIG_OF_NEW_SEGMENT_EXPIRATION_SECONDS` (defaulting to 
`DEFAULT_VALUE_OF_NEW_SEGMENT_EXPIRATION_SECONDS`, 5 min), converts to ms, and 
passes it to the `SegmentPartitionMetadataManager` constructor.
   - `SegmentPartitionMetadataManager` takes the expiration as a constructor 
arg and uses the 3-arg `isNewSegment` overload.
   - Removed the now-unused 2-arg `InstanceSelector.isNewSegment(long, long)` 
overload and the `NEW_SEGMENT_EXPIRATION_MILLIS` constant.
   


-- 
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]

Reply via email to