lokeshj1703 commented on code in PR #11496:
URL: https://github.com/apache/hudi/pull/11496#discussion_r1666742399


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadata.java:
##########
@@ -154,6 +154,9 @@ private void initIfNeeded() {
         this.metadataTableConfig = null;
       }
     }
+    if (metadataFileSystemView == null) {
+      System.out.println("adsfasdf");
+    }

Review Comment:
   unintended change



##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -1026,6 +1026,9 @@ public static int mapRecordKeyToFileGroupIndex(String 
recordKey, int numFileGrou
   public static List<FileSlice> getPartitionLatestMergedFileSlices(
       HoodieTableMetaClient metaClient, HoodieTableFileSystemView fsView, 
String partition) {
     LOG.info("Loading latest merged file slices for metadata table partition 
{}", partition);
+    if (fsView == null) {
+      System.out.println("testKeepLatestCommitWithDeletePartitionasfd");
+    }

Review Comment:
   unintended change



##########
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:
   NIT: We can replace `finalFsView` with `fsView`



-- 
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]

Reply via email to