mcvsubbu commented on a change in pull request #6031:
URL: https://github.com/apache/incubator-pinot/pull/6031#discussion_r491192719



##########
File path: 
pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/realtime/PinotLLCRealtimeSegmentManager.java
##########
@@ -569,13 +576,44 @@ private SegmentPartitionMetadata 
getPartitionMetadataFromTableConfig(TableConfig
     for (Map.Entry<String, ColumnPartitionConfig> entry : 
partitionConfig.getColumnPartitionMap().entrySet()) {
       String columnName = entry.getKey();
       ColumnPartitionConfig columnPartitionConfig = entry.getValue();
+
+      // NOTE: Here we compare the number of partitions from the config and 
the stream, and log a warning when they
+      //       don't match, but use the one from the stream. The mismatch 
could happen when the stream partitions are
+      //       changed, but the table config has not been updated to reflect 
the change. In such case, picking the
+      //       number of partitions from the stream can keep the segment 
properly partitioned as long as the partition
+      //       function is not changed.
+      if (columnPartitionConfig.getNumPartitions() != numPartitions) {

Review comment:
       For realtime table, maybe we should not have the num partitions in the 
tableconfig. It can be set to -1, to indicate that it needs to come from the 
stream.




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

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