You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/07/21 09:04:09 UTC

[GitHub] [hudi] danny0405 commented on a diff in pull request #6157: [HUDI-4431] Fix log file will not roll over to a new file

danny0405 commented on code in PR #6157:
URL: https://github.com/apache/hudi/pull/6157#discussion_r926437353


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieLogFormatWriter.java:
##########
@@ -94,7 +94,8 @@ private FSDataOutputStream getOutputStream() throws IOException, InterruptedExce
       Path path = logFile.getPath();
       if (fs.exists(path)) {
         boolean isAppendSupported = StorageSchemes.isAppendSupported(fs.getScheme());
-        if (isAppendSupported) {
+        boolean needRollOverToNewFile = fs.getFileStatus(path).getLen() > sizeThreshold;
+        if (isAppendSupported && !needRollOverToNewFile) {

Review Comment:
   Should we modify it here ? `HoodieAppendHandle#canWrite` already take this ?



-- 
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-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org