nsivabalan commented on code in PR #8079:
URL: https://github.com/apache/hudi/pull/8079#discussion_r1122010419


##########
hudi-common/src/main/java/org/apache/hudi/common/table/view/AbstractTableFileSystemView.java:
##########
@@ -282,6 +286,20 @@ public void reset() {
     }
   }
 
+  /**
+   * Resets the view states, which can be overridden by subclasses.  This 
reset logic is guarded
+   * by the write lock.
+   * <p>
+   * NOTE: This method SHOULD BE OVERRIDDEN for any custom logic.  DO NOT 
OVERRIDE
+   * {@link AbstractTableFileSystemView#reset} directly, which may cause stale 
file system view
+   * to be served.
+   */
+  protected void runReset() {

Review Comment:
   it is guarded Danny. 
   
   As per master. 
   
   Non metadata : 
   ```
   sync() {
      lock
        runSync {
             clean and init timeline. 
          }
     release lock 
   }
   ```
   w/ Metadata file system view
   ```
   sync() in MFSV {
     super.sync {
          lock
            runSync {
                 clean and init timeline. 
              }
         release lock 
      }
     tableMetadata.reset();
   }
   ```
   
   With this patch, here is how it is changing:
   w/o metadata.
   
   ```
   sync() {
      lock
        runSync {
             clean and init timeline. 
          }
     release lock 
   }
   ```
   no changes
   
   
   w/ MFSV
   ```
   sync() in ATFSV (not overridden in MFSV) {
          lock
            runSync { // overridden in MFSV {
                       super.runSync {
                            clean and init timeline. 
                       }
                 tableMetadata.reset();
             }
         release lock 
      }
   }
   ```
   
   
   
   



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