From f0d85e50c85beccdeeb8da37c70b748c268a0f22 Mon Sep 17 00:00:00 2001 From: Yuwei XIAO Date: Fri, 9 Sep 2022 23:55:24 +0800 Subject: [PATCH] [HUDI-4807] Use base table instant for metadata initialization (#6629) --- .../hudi/table/action/index/ScheduleIndexActionExecutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/index/ScheduleIndexActionExecutor.java b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/index/ScheduleIndexActionExecutor.java index c306f4f6f05b..d562dec671d1 100644 --- a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/index/ScheduleIndexActionExecutor.java +++ b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/table/action/index/ScheduleIndexActionExecutor.java @@ -107,7 +107,7 @@ public Option execute() { .orElseThrow(() -> new HoodieIndexException(String.format("Could not get metadata writer to initialize filegroups for indexing for instant: %s", instantTime))); if (!finalPartitionsToIndex.get(0).getPartitionPath().equals(MetadataPartitionType.FILES.getPartitionPath())) { // initialize metadata partition only if not for FILES partition. - metadataWriter.initializeMetadataPartitions(table.getMetaClient(), finalPartitionsToIndex, indexInstant.getTimestamp()); + metadataWriter.initializeMetadataPartitions(table.getMetaClient(), finalPartitionsToIndex, indexUptoInstant.get().getTimestamp()); } // for each partitionToIndex add that time to the plan