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

   ## What changes are proposed in this pull request?
   
   `ThrowOnOomMemoryTarget.borrow` retries with backoff while waiting for 
off-heap memory to be granted. When the `Thread.sleep` between retries is 
interrupted — a task killed while waiting — the handler restored the interrupt 
flag but then `break`-ed out of the retry loop and fell through to the OOM 
path, which throws an off-heap `OutOfMemoryException` and builds a full memory 
dump for a task that was simply cancelled.
   
   This throws immediately on interruption, carrying the `InterruptedException` 
as the cause and keeping the interrupt flag set, so a cancelled task surfaces 
as a cancellation rather than a misleading OOM with a wasted memory dump.
   
   ## How was this patch tested?
   
   New `ThrowOnOomMemoryTargetTest`: with the interrupt flag pre-set so the 
first retry sleep throws, `borrow` now fails with a `RuntimeException` whose 
cause is the `InterruptedException`, and the interrupt status is left set.
   
   ## Was this patch authored or co-authored using generative AI tooling?
   
   Yes. Generated-by: Claude Opus.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to