codope commented on code in PR #10860:
URL: https://github.com/apache/hudi/pull/10860#discussion_r1554955230
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -991,9 +1001,9 @@ private void
updateFunctionalIndexIfPresent(HoodieCommitMetadata commitMetadata,
private HoodieData<HoodieRecord>
getFunctionalIndexUpdates(HoodieCommitMetadata commitMetadata, String
indexPartition, String instantTime) throws Exception {
HoodieFunctionalIndexDefinition indexDefinition =
getFunctionalIndexDefinition(indexPartition);
List<Pair<String, FileSlice>> partitionFileSlicePairs = new ArrayList<>();
- HoodieTableFileSystemView fsView =
HoodieTableMetadataUtil.getFileSystemView(metadataMetaClient);
+ HoodieTableFileSystemView fsView =
HoodieTableMetadataUtil.getFileSystemView(dataMetaClient);
commitMetadata.getPartitionToWriteStats().forEach((dataPartition, value)
-> {
- List<FileSlice> fileSlices =
getPartitionLatestFileSlicesIncludingInflight(metadataMetaClient,
Option.ofNullable(fsView), dataPartition);
+ List<FileSlice> fileSlices =
getPartitionLatestFileSlicesIncludingInflight(dataMetaClient,
Option.ofNullable(fsView), dataPartition);
Review Comment:
Not following you here. In multi-writer scenario, there is a new latest file
slice due to instant t1 but `dataMetaClient` had already been initialized
before t1 (say upto instant t0), then index will only be updated upto t0. In
this case, `getPartitionLatestFileSlicesIncludingInflight` will only return
file slices upto t0. The fsView API will return file slices from a consistent
snapshot.
--
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]