Abacn opened a new pull request, #41028:
URL: https://github.com/apache/beam/pull/41028

   In JDK 22+ and later JDK 21 updates, JDK-8319713 removed the proactive Full 
GC check after Young GCs in ParallelGC. As a result, ParallelGC no longer runs 
Full GCs until Old Gen (`ParOldGen`) is completely exhausted, delaying garbage 
collection and finalization of objects promoted to Old Gen. Because 
`ApplianceShuffleWriter` previously relied solely on `finalize()` to invoke 
native `destroy()`, native C++ shuffle writer buffers and `ShuffleSinkWriter` 
references from completed bundles remained uncollected in memory across 
bundles, leading to excessive heap + native RSS and container OOM kills under 
high shuffle fanout.
   
   - Explicitly destroy native ApplianceShuffleWriter and clear `chunk` and 
`writer` references in `ShuffleSinkWriter.close()`
   
   - Lazily allocate `ShuffleSinkWriter.chunk` 
(`RandomAccessData(MIN_OUTPUT_CHUNK_SIZE)`) on the first `add()` call instead 
of in the `ShuffleSinkWriter` constructor.
   
   Internal tracker: b/458113396
   <!--
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   
    - [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
    - [ ] Replace these instructions with a description of your change and why 
you have made it.
    - [ ] Mention the appropriate issue in your description (for example: 
`addresses #123` or `fixes #456`).
    - [ ] Update `CHANGES.md` with noteworthy changes.
   
   See [CONTRIBUTING.md]() for more details.
   
   -->
   


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