fhan688 commented on code in PR #19728: URL: https://github.com/apache/hudi/pull/19728#discussion_r3862939657
########## hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/StreamWriteFunction.java: ########## Review Comment: > As discussed in [#19692 (comment)](https://github.com/apache/hudi/pull/19692#discussion_r3827189498), Now that memory exhaustion during `writeRow()` already triggers `MemoryReclaimer#reclaim` to flush the largest inactive bucket, we don't need to eagerly flush `bucketToFlush` when failedBucket is diverged? Agreed. With owner-aware preemption, an allocation failure during `writeRow()` already attempts to flush the largest inactive bucket before the current bucket can diverge. Eagerly flushing another bucket after divergence is therefore redundant. I simplified the diverged path to flush and dispose only the failed bucket before retrying. The largest-bucket fallback is still retained for buffer-creation failures, where there is no active owner and preemptive reclamation is not triggered. -- 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]
