littleeleventhwolf commented on code in PR #8664:
URL: https://github.com/apache/hudi/pull/8664#discussion_r1187376300


##########
hudi-common/src/main/java/org/apache/hudi/common/table/view/FileSystemViewManager.java:
##########
@@ -162,29 +162,28 @@ private static SpillableMapBasedFileSystemView 
createSpillableMapBasedFileSystem
    */
   private static HoodieTableFileSystemView 
createInMemoryFileSystemView(HoodieMetadataConfig metadataConfig, 
FileSystemViewStorageConfig viewConf,
                                                                         
HoodieTableMetaClient metaClient, SerializableSupplier<HoodieTableMetadata> 
metadataSupplier) {
-    LOG.info("Creating InMemory based view for basePath " + 
metaClient.getBasePath());
+    LOG.info("Creating InMemory based view for basePath " + 
metaClient.getBasePathV2());
     HoodieTimeline timeline = 
metaClient.getActiveTimeline().filterCompletedAndCompactionInstants();
     if (metadataConfig.enabled()) {
       ValidationUtils.checkArgument(metadataSupplier != null, "Metadata 
supplier is null. Cannot instantiate metadata file system view");
-      return new HoodieMetadataFileSystemView(metaClient, 
metaClient.getActiveTimeline().filterCompletedAndCompactionInstants(),
-          metadataSupplier.get());
+      return new HoodieMetadataFileSystemView(metaClient, timeline, 
metadataSupplier.get());
     }
     if (metaClient.getMetaserverConfig().isMetaserverEnabled()) {
       return (HoodieTableFileSystemView) 
ReflectionUtils.loadClass(HOODIE_METASERVER_FILE_SYSTEM_VIEW_CLASS,
           new Class<?>[] {HoodieTableMetaClient.class, HoodieTimeline.class, 
HoodieMetaserverConfig.class},
-          metaClient, 
metaClient.getActiveTimeline().getCommitsTimeline().filterCompletedInstants(), 
metaClient.getMetaserverConfig());
+          metaClient, timeline, metaClient.getMetaserverConfig());

Review Comment:
   I review the Git commit history and find when instantiating 
HoodieMetadataFileSystemView, compaction instants were initially excluded. 
Later, in [HUDI-3692](https://issues.apache.org/jira/browse/HUDI-3692), this 
issue was fixed by using the timeline that includes compaction instants.
   So I think when initializing HoodieMetaserverFileSystemView, compaction 
instants should also be included to ensure the  correctness of asynchronous 
compaction.



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