This is an automated email from the ASF dual-hosted git repository.

danny0405 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hudi.git


The following commit(s) were added to refs/heads/master by this push:
     new 767da51baeb [HUDI-5821] Improve the resource release for 
HoodieTableFileSystemView (#7995)
767da51baeb is described below

commit 767da51baebc4829230868d5ee269831cb42cd03
Author: Danny Chan <[email protected]>
AuthorDate: Tue Feb 21 10:14:44 2023 +0800

    [HUDI-5821] Improve the resource release for HoodieTableFileSystemView 
(#7995)
---
 .../org/apache/hudi/common/table/view/AbstractTableFileSystemView.java | 3 ++-
 .../org/apache/hudi/common/table/view/HoodieTableFileSystemView.java   | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java
 
b/hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java
index bf4dad5deb3..18a8e9badc1 100644
--- 
a/hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java
+++ 
b/hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java
@@ -259,6 +259,8 @@ public abstract class AbstractTableFileSystemView 
implements SyncableFileSystemV
   public void close() {
     try {
       writeLock.lock();
+      this.metaClient = null;
+      this.visibleCommitsAndCompactionTimeline = null;
       clear();
     } finally {
       writeLock.unlock();
@@ -1406,7 +1408,6 @@ public abstract class AbstractTableFileSystemView 
implements SyncableFileSystemV
    * @param newTimeline New Hoodie Timeline
    */
   protected void runSync(HoodieTimeline oldTimeline, HoodieTimeline 
newTimeline) {
-    refreshTimeline(newTimeline);
     clear();
     // Initialize with new Hoodie timeline.
     init(metaClient, newTimeline);
diff --git 
a/hudi-common/src/main/java/org/apache/hudi/common/table/view/HoodieTableFileSystemView.java
 
b/hudi-common/src/main/java/org/apache/hudi/common/table/view/HoodieTableFileSystemView.java
index ea72f305b07..e6b00ca0d8e 100644
--- 
a/hudi-common/src/main/java/org/apache/hudi/common/table/view/HoodieTableFileSystemView.java
+++ 
b/hudi-common/src/main/java/org/apache/hudi/common/table/view/HoodieTableFileSystemView.java
@@ -430,11 +430,12 @@ public class HoodieTableFileSystemView extends 
IncrementalTimelineSyncFileSystem
   public void close() {
     super.close();
     this.fgIdToPendingCompaction = null;
+    this.fgIdToPendingLogCompaction = null;
     this.partitionToFileGroupsMap = null;
     this.fgIdToBootstrapBaseFile = null;
     this.fgIdToReplaceInstants = null;
     this.fgIdToPendingClustering = null;
-    closed = true;
+    this.closed = true;
   }
 
   @Override

Reply via email to