Jackie-Jiang commented on a change in pull request #6031: URL: https://github.com/apache/incubator-pinot/pull/6031#discussion_r491201298
########## 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: Good point, or we just don't read it. While we can still use it when the server failed to get the numPartitions from the stream (the existing behavior). ---------------------------------------------------------------- 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