danny0405 commented on code in PR #8079: URL: https://github.com/apache/hudi/pull/8079#discussion_r1121416847
########## 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: Guess the method should be guarded by reset `writeLock` ? `#reset` should invoke `#runReset` instead I guess. And can we give these methods more straight-forward names? Like sync -> syncThreadSafely, runSync -> sync, reset->resetThreadSafely, runReset -> reset -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org