github-actions[bot] commented on code in PR #66018:
URL: https://github.com/apache/doris/pull/66018#discussion_r3655837784


##########
fe/be-java-extensions/paimon-scanner/src/main/java/org/apache/doris/paimon/PaimonJniScanner.java:
##########
@@ -334,6 +336,7 @@ public void close() throws IOException {
                 }
             }
         } finally {
+            releaseCachedTable();

Review Comment:
   [P1] Guarantee cache release when legacy cleanup fails before Java close. 
The V1 `JniReader::close()` sets `_closed = true` before several fallible JNI 
calls, including `releaseTable()`. That release reaches 
`VectorColumn.freeVarbinaryData()`, which allocates `new long[appendIndex]`; 
under the memory pressure this PR targets, an OOM returns before 
`_jni_scanner_close`, and every later V1 close is a no-op. Dropping the JNI 
global reference cannot decrement this new static cache, so the entry, user 
count, and deserialized table remain for the BE lifetime. V2 already attempts 
Java close even when `releaseTable()` fails and keeps failed cleanup retryable. 
Please give V1 the same status-aggregation/retry ordering (or otherwise 
guarantee independent cache release) and add an injected pre-Java-close failure 
test that proves the cache returns to zero.



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