prashantwason commented on a change in pull request #4206:
URL: https://github.com/apache/hudi/pull/4206#discussion_r762379434



##########
File path: 
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java
##########
@@ -352,7 +354,9 @@ public static int mapRecordKeyToFileGroupIndex(String 
recordKey, int numFileGrou
     }
 
     HoodieTableFileSystemView fsView = new 
HoodieTableFileSystemView(metaClient, timeline);
-    return fsView.getLatestUnCompactedFileSlices(partition).sorted((s1, s2) -> 
s1.getFileId().compareTo(s2.getFileId()))
+    Stream<FileSlice> fileSliceStream = isReader ? 
fsView.getLatestMergedFileSlicesBeforeOrOn(partition, 
timeline.filterCompletedInstants().lastInstant().get().getTimestamp()) :

Review comment:
       Please add a comment to reason the difference in logic between reader 
and writer code paths - Why different fileslices are returned for different 
code paths?




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