ankitsultana commented on code in PR #16086:
URL: https://github.com/apache/pinot/pull/16086#discussion_r2150434838


##########
pinot-plugins/pinot-minion-tasks/pinot-minion-builtin-tasks/src/main/java/org/apache/pinot/plugin/minion/tasks/upsertcompactmerge/UpsertCompactMergeTaskExecutor.java:
##########
@@ -99,10 +98,10 @@ protected List<SegmentConversionResult> 
convert(PinotTaskConfig pinotTaskConfig,
     // validate if partitionID is same for all small segments. Get partition 
id value for new segment.
     int partitionID = getCommonPartitionIDForSegments(segmentMetadataList);
 
-    // get the max creation time of the small segments. This will be the index 
creation time for the new segment.
-    Optional<Long> maxCreationTimeOfMergingSegments =
-        
segmentMetadataList.stream().map(SegmentMetadataImpl::getIndexCreationTime).reduce(Long::max);
-    if (maxCreationTimeOfMergingSegments.isEmpty()) {
+    // get the max creation time from the task configuration passed by the 
generator
+    long maxCreationTimeOfMergingSegments =
+        
Long.parseLong(configs.get(MinionConstants.UpsertCompactMergeTask.MAX_CREATION_TIME_MILLIS_KEY));

Review Comment:
   This could be null during rollouts right?
   
   Regardless, I think we should handle config.get returning null gracefully



-- 
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: commits-unsubscr...@pinot.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to