danny0405 opened a new pull request, #19482:
URL: https://github.com/apache/hudi/pull/19482

   ### Describe the issue this Pull Request addresses
   
   CDC image loading allocates spillable maps that were not closed when 
iterator creation or traversal failed, leaking disk and native resources. The 
LOG_FILE path also allocated a spillable map for an absent before-slice even 
though that cache remains empty.
   
   ### Summary and Changelog
   
   - Close newly allocated CDC image maps when loading or cache registration 
fails, preserving cleanup failures as suppressed exceptions.
   - Generalize image-record helpers to the `Map` interface and use 
`Collections.emptyMap()` when no before-image slice exists.
   - Ensure the log-record iterator and image manager are both closed while 
preserving the primary close failure.
   - Add focused coverage for iterator-creation and iteration failure cleanup.
   
   ### Impact
   
   Prevents temporary disk and native resource leaks in Flink CDC reads. There 
are no public API, configuration, storage-format, or user-visible behavior 
changes.
   
   ### Risk Level
   
   Low. The changes are localized to Flink CDC image-cache lifecycle handling 
and are covered by focused unit tests.
   
   ### Documentation Update
   
   None.
   
   ### Contributor's checklist
   
   - [x] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Enough context is provided in the sections above
   - [x] Adequate tests were added if applicable
   


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

Reply via email to