Jackie-Jiang commented on code in PR #16401:
URL: https://github.com/apache/pinot/pull/16401#discussion_r2237835537


##########
pinot-broker/src/main/java/org/apache/pinot/broker/routing/instanceselector/BalancedInstanceSelector.java:
##########
@@ -51,9 +51,10 @@ public class BalancedInstanceSelector extends 
BaseInstanceSelector {
 
   public BalancedInstanceSelector(String tableNameWithType, 
ZkHelixPropertyStore<ZNRecord> propertyStore,
       BrokerMetrics brokerMetrics, @Nullable AdaptiveServerSelector 
adaptiveServerSelector, Clock clock,
-      boolean useFixedReplica, long newSegmentExpirationTimeInSeconds) {
+      boolean useFixedReplica, long newSegmentExpirationTimeInSeconds,

Review Comment:
   We can probably revisit the default new segment expiration time. `5 minutes` 
is probably too short



##########
pinot-broker/src/main/java/org/apache/pinot/broker/routing/instanceselector/BaseInstanceSelector.java:
##########
@@ -183,7 +186,9 @@ Map<String, Long> 
getNewSegmentCreationTimeMapFromZK(IdealState idealState, Exte
       }
       SegmentZKMetadata segmentZKMetadata = new SegmentZKMetadata(record);
       long creationTimeMs = 
SegmentUtils.getSegmentCreationTimeMs(segmentZKMetadata);
-      if (InstanceSelector.isNewSegment(creationTimeMs, currentTimeMs, 
_newSegmentExpirationTimeInSeconds * 1000)) {
+      long segmentExpirationTimeInSec = 
segmentZKMetadata.getSegmentName().startsWith("refreshed__")

Review Comment:
   This logic is not general. Let's discuss a general way to handle this



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