danny0405 commented on code in PR #11496: URL: https://github.com/apache/hudi/pull/11496#discussion_r1664947146
########## hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java: ########## @@ -1082,8 +1083,10 @@ private HoodieData<HoodieRecord> getFunctionalIndexUpdates(HoodieCommitMetadata HoodieIndexDefinition indexDefinition = getFunctionalIndexDefinition(indexPartition); List<Pair<String, FileSlice>> partitionFileSlicePairs = new ArrayList<>(); HoodieTableFileSystemView fsView = HoodieTableMetadataUtil.getFileSystemView(dataMetaClient); + fileSystemViews.add(fsView); + HoodieTableFileSystemView finalFsView = fsView; commitMetadata.getPartitionToWriteStats().forEach((dataPartition, value) -> { - List<FileSlice> fileSlices = getPartitionLatestFileSlicesIncludingInflight(dataMetaClient, Option.ofNullable(fsView), dataPartition); + List<FileSlice> fileSlices = getPartitionLatestFileSlicesIncludingInflight(dataMetaClient, Option.ofNullable(finalFsView), dataPartition); Review Comment: Can we move the instantiation of `fsView` inside `getPartitionLatestFileSlicesIncludingInflight`. -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org