You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "nsivabalan (via GitHub)" <gi...@apache.org> on 2023/03/16 00:15:01 UTC

[GitHub] [hudi] nsivabalan commented on a diff in pull request #8194: [HUDI-5937] Archived log file never rollover

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


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/HoodieLogFormatWriter.java:
##########
@@ -216,9 +216,10 @@ private int getLogBlockLength(int contentLength, int headerLength, int footerLen
 
   private void rolloverIfNeeded() throws IOException {
     // Roll over if the size is past the threshold
-    if (getCurrentSize() > sizeThreshold) {
-      LOG.info("CurrentSize " + getCurrentSize() + " has reached threshold " + sizeThreshold
-          + ". Rolling over to the next version");
+    long currentSize = fs.getFileStatus(logFile.getPath()).getLen();
+    if (currentSize > sizeThreshold) {

Review Comment:
   @prashantwason @suryaprasanna : Can you guys review this patch. surprised that rolliover isn't working. 



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