lnbest0707-uber commented on code in PR #16494:
URL: https://github.com/apache/pinot/pull/16494#discussion_r2294823224


##########
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManager.java:
##########
@@ -1833,29 +1896,31 @@ private StreamPartitionMsgOffset 
selectStartOffset(OffsetCriteria offsetCriteria
   }
 
   private LLCSegmentName getNextLLCSegmentName(LLCSegmentName 
lastLLCSegmentName, long creationTimeMs) {
-    return new LLCSegmentName(lastLLCSegmentName.getTableName(), 
lastLLCSegmentName.getPartitionGroupId(),
-        lastLLCSegmentName.getSequenceNumber() + 1, creationTimeMs);
+    return new LLCSegmentName(lastLLCSegmentName.getTableName(), 
lastLLCSegmentName.getTopicName(),
+        lastLLCSegmentName.getPartitionGroupId(), 
lastLLCSegmentName.getSequenceNumber() + 1, creationTimeMs);
   }
 
   /**
    * Sets up a new partition group.
    * <p>Persists the ZK metadata for the first CONSUMING segment, and returns 
the segment name.
    */
-  private String setupNewPartitionGroup(TableConfig tableConfig, StreamConfig 
streamConfig,
+  private String setupNewPartitionGroup(TableConfig tableConfig, 
List<StreamConfig> streamConfigs,

Review Comment:
   If you check the usage of `setupNewPartitionGroup`, they were all doing 
`setupNewPartitionGroup(xx, streamConfigs.get(0), xxx)`.
   The function mainly relies on `partitionGroupMetadata` to setup new 
partition. And the `streamConfig` is only used for fetching the flush threshold 
parameters. And it is using the 1st config's instead of the corresponding's.
   With this change, we would pass in the entire table config ('s 
streamConfigMaps). And the followup usages can pick the correct `streamConfig` 
by cross checking the `partitionGroupMetadata` and use their own flush 
threshold values.



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