Jackie-Jiang commented on a change in pull request #7756:
URL: https://github.com/apache/pinot/pull/7756#discussion_r747966373



##########
File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManager.java
##########
@@ -1232,18 +1232,25 @@ private LLCSegmentName 
getNextLLCSegmentName(LLCSegmentName lastLLCSegmentName,
    */
   private String setupNewPartitionGroup(TableConfig tableConfig, 
PartitionLevelStreamConfig streamConfig,
       PartitionGroupMetadata partitionGroupMetadata, long creationTimeMs, 
InstancePartitions instancePartitions,
-      int numPartitionGroups, int numReplicas, List<PartitionGroupMetadata> 
partitionGroupMetadataList) {
+      int numPartitionGroups, int numReplicas, List<PartitionGroupMetadata> 
partitionGroupMetadataList,
+      boolean isLiveTable) {
     String realtimeTableName = tableConfig.getTableName();
     int partitionGroupId = partitionGroupMetadata.getPartitionGroupId();
-    String startOffset = partitionGroupMetadata.getStartOffset().toString();
+    StreamPartitionMsgOffset startOffset;
+    if (isLiveTable) {
+      startOffset = getPartitionGroupSmallestOffset(streamConfig, 
partitionGroupId);

Review comment:
       This method is actually overriding the offset criteria and call 
`getNewPartitionGroupMetadataList()` to get all `PartitionGroupMetadata` but 
only return the offset for one partition. Handling it here is not efficient, 
and also not avoiding the problem of overriding the stream config. I slightly 
prefer the fix in #7743 




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