You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "fhan688 (via GitHub)" <gi...@apache.org> on 2026/05/12 13:34:51 UTC

Re: [PR] [HUDI-9799] Add metric of totalCorruptLogFiles when stream read [hudi]

fhan688 commented on code in PR #13870:
URL: https://github.com/apache/hudi/pull/13870#discussion_r3226799996


##########
hudi-common/src/main/java/org/apache/hudi/common/table/log/BaseHoodieLogRecordReader.java:
##########
@@ -122,6 +123,10 @@ public abstract class BaseHoodieLogRecordReader<T> {
   private AtomicLong totalRollbacks = new AtomicLong(0);
   // Total number of corrupt blocks written across all log files
   private AtomicLong totalCorruptBlocks = new AtomicLong(0);
+  // Total number of corrupt log files - for metrics
+  private AtomicLong totalCorruptLogFiles = new AtomicLong(0);

Review Comment:
   If an EOFException occurs during the first read of the log file in the HoodieLogFileReader#readMagic(), then `totalCorruptBlocks` will not record the error; instead, `totalCorruptLogFiles` will be used to record it.



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