cshuo commented on code in PR #20023:
URL: https://github.com/apache/hudi/pull/20023#discussion_r4071451751


##########
hudi-common/src/main/java/org/apache/hudi/common/table/read/lsm/SpillableLsmRecordIterator.java:
##########
@@ -166,6 +166,13 @@ private void 
closeSourceIterator(ClosableIterator<BufferedRecord<T>> sourceItera
       if (spillFailure != null) {
         spillFailure.addSuppressed(e);
       } else {
+        // Closing the source iterator failed, so construction cannot complete 
and the outer reader
+        // cannot call close() on this spill iterator. Delete its spill file 
here to avoid leaking it.
+        try {

Review Comment:
   Fixed in a80e1cc29f7. Replaced the cleanup try/catch with 
`CloseableUtils.closeSuppressing(this::deleteSpillFile, e)`. All 13 targeted 
tests pass.



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