suxiaogang223 opened a new pull request, #67114: URL: https://github.com/apache/doris/pull/67114
### What problem does this PR solve? Issue Number: [DORIS-28080](http://39.106.86.136:8090/browse/DORIS-28080) Problem Summary: When a Paimon JNI writer hits an OOM while flushing or closing, Java cleanup can fail while asynchronous SDK tasks still reference Doris-owned native pages. The failed writer then cannot be safely released, and subsequent writes remain unavailable until the BE is restarted. This PR: - makes Java resource cleanup retryable after Throwable, including OutOfMemoryError, and retains only resources whose close did not succeed; - avoids prepareCommit from the abort/OOM path because it can trigger more flushing and compaction allocation; - quarantines the Java writer together with PaimonJniMemoryManager when close cannot be confirmed; - retries quarantined close operations before admitting a later writer, releasing JNI ownership and native pages only after close succeeds; - keeps the JNI close state minimal: the writer global reference keeps its defining class loaded, so no separate class global reference is needed. While cleanup still fails, new Paimon JNI writes fail fast instead of risking use-after-free. Once cleanup succeeds, later writes can proceed without restarting the BE. ### Release note Fix Paimon JNI writes remaining unavailable after an OOM during writer cleanup. ### Check List (For Author) - Test - [ ] Regression test - [x] Unit Test - [ ] Manual test - [ ] No need to test or manual test. - Behavior changed: - [ ] No. - [x] Yes. Paimon JNI writer cleanup can be retried after OOM, allowing later writes to recover without a BE restart. - Does this need documentation? - [x] No. - [ ] Yes. Validation: - FE/BE-Java build: 27 modules passed, Checkstyle 0 violations. - PaimonJniWriterTest: 6 tests passed. - clang-format 16 dry-run and git diff --check passed. - BE C++ compilation and BE unit tests were intentionally not run for this change. ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label -- 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]
