Davis-Zhang-Onehouse commented on code in PR #19717:
URL: https://github.com/apache/hudi/pull/19717#discussion_r3874848220
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -830,15 +875,25 @@ public void buildMetadataPartitions(HoodieEngineContext
engineContext, List<Hood
if (!enabledIndexerMap.containsKey(partitionType)) {
throw new HoodieIndexException(String.format("Indexing for metadata
partition: %s is not enabled", partitionType));
}
- partitionTypes.add(partitionType);
- partitionPaths.add(relativePartitionPath);
+ if (partitionType == SECONDARY_INDEX || partitionType ==
EXPRESSION_INDEX) {
+ String previous = requestedPartitionPaths.put(partitionType,
relativePartitionPath);
Review Comment:
Yes, within one plan: the scheduler derives a single partition name per type
(buildIndexPartitionInfo resolves the secondary or expression index name from
the single-valued index name and column configs), so a plan cannot legitimately
carry two paths of the same type, and the checkState turns a future violation
of that into a loud failure instead of one path silently winning the map slot.
Across plans there is no such limit; the expanded TestHoodieIndexer test builds
two secondary and two expression indexes with consecutive actions.
--
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]