cshuo opened a new issue, #20132: URL: https://github.com/apache/hudi/issues/20132
### Bug Description **What happened:** During native MOR log writes, `HoodieNativeLogAppendHandle` calls `flushAppend()` from `writeInsertAndUpdate()` or `writeDelete()` when the current file needs to roll over. If that flush fails, the exception reaches `HoodieAppendHandle.writeRecord()`. With `hoodie.write.ignore.failed=true`, the record-level catch block marks only the triggering record as failed and allows the loop to process subsequent records. However, a flush failure affects the entire buffered batch and can leave a partially finalized file or incomplete append accounting. It is not safe to treat it as an isolated record failure. This concerns rollover flushes inside the record-writing path; a final flush performed outside that catch block already propagates its failure. **What was expected:** Flush failures should abort the handle and propagate regardless of `hoodie.write.ignore.failed`. Cleanup should preserve the original failure and attach any close failure as suppressed. Ordinary record write failures should continue to honor the configuration. **Steps to reproduce:** 1. Enable `hoodie.write.ignore.failed=true` and use native MOR log files. 2. Fill the current data or delete file so that the next record triggers a rollover flush. 3. Inject an I/O or runtime failure while flushing the file, including close or metadata-finalization failures. 4. Observe that the record-level handler records a failure and continues to the next record instead of aborting the write. ### Environment **Hudi version:** 1.3.0-SNAPSHOT, observed in the checkout based on `39d05f53713`. **Component:** `hudi-client/hudi-client-common`; native log append handles. **Query engine:** Reproducible with mocked native file writers in the common client tests. **Relevant configuration:** `hoodie.write.ignore.failed=true`. Flink's corresponding `write.ignore.failed` defaults to false; the ignore-enabled path is the affected case. ### Suggested Fix Introduce a dedicated `HoodieLogFlushException` extending `HoodieException`, wrap native flush failures with it, and always propagate this exception through the record-writing handler after cleanup. Keep generic append and record failures subject to the existing ignore setting. Related: #20118 handles independent closing of data and delete writers; this issue addresses propagation of flush failures. -- 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]
