yihua commented on code in PR #6664:
URL: https://github.com/apache/hudi/pull/6664#discussion_r982746433


##########
hudi-common/src/main/java/org/apache/hudi/BaseHoodieTableFileIndex.java:
##########
@@ -304,6 +304,18 @@ private void doRefresh() {
                   .orElse(Collections.emptyList())
               )
           );
+    } else if (tableType.equals(HoodieTableType.MERGE_ON_READ) && 
queryType.equals(HoodieTableQueryType.READ_OPTIMIZED)) {
+      cachedAllInputFileSlices = partitionFiles.keySet().stream()
+          .collect(Collectors.toMap(
+                  Function.identity(),
+                  partitionPath ->
+                      queryInstant.map(instant ->
+                              
fileSystemView.getLatestMergedFileSlicesWithOnlyBaseFileBeforeOrOn(partitionPath.path,
 queryInstant.get())

Review Comment:
   Basically, you're fixing the problem where the compaction is in progress and 
the file slice falling into the compaction under construction should not be 
included until it is committed.  Shall we fix the 
`getLatestFileSlicesBeforeOrOn` instead of adding a new API here?



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