LuciferYang opened a new pull request, #10224:
URL: https://github.com/apache/paimon/pull/10224

   ### Purpose
   
   `DataEvolutionNormalCompactTask` closed its writer and store write only on 
the success path. When the compact loop threw (the missing-rows or extra-rows 
checks after the reader returned fewer or more rows than the plan expected, or 
an IO error from `writer.write` / `prepareCommit`), the exception propagated 
before the close ran, so the writer's open files and write buffers leaked; 
repeated failures could exhaust file handles.
   
   The closes now live in a `finally` block, each guarded by its own 
warn-and-continue so a close failure cannot mask the original exception, 
matching `DataEvolutionMaterializeDeletionCompactTask`. Output-range planning 
is hoisted above resource creation as well, so a planning failure no longer 
leaks an already-created writer.
   
   ### Tests
   
   Added 
`DataEvolutionNormalCompactTaskTest.testStoreWriteClosedWhenCompactionFails`: 
it forces the compact loop to fail after the writer is created and asserts both 
the writer and the store write are still closed. The test fails against the 
current code and passes with this change.
   
   ### API and Format
   
   No.
   
   ### Documentation
   
   No.
   


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