suxiaogang223 opened a new pull request, #66269:
URL: https://github.com/apache/doris/pull/66269

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Related PR: None
   
   Problem Summary:
   
   `JdbcOceanBaseClient` creates a temporary Hikari connection pool to query 
`ob_compatibility_mode` before constructing the MySQL- or Oracle-compatible 
client used by the catalog. The detection path closed its result set, 
statement, and connection, but left the temporary data source alive after 
successful initialization. Repeated OceanBase catalog initialization therefore 
accumulated pooled connections and Hikari maintenance threads.
   
   This change always closes the temporary client after compatibility 
detection. The returned MySQL or Oracle client and its connection pool remain 
open for normal catalog use. Unit tests cover successful client creation and 
the missing-mode failure path, verify JDBC resource and data-source close 
ordering, and ensure the returned client pool is not closed prematurely.
   
   ### Release note
   
   Fix an OceanBase JDBC catalog connection and Hikari thread leak during 
client initialization.
   
   ### Check List (For Author)
   
   - Test
       - [ ] Regression test
       - [x] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test. Explain why:
           - [ ] This is a refactor/code format and no logic has been changed.
           - [ ] Previous test can cover this change.
           - [ ] No code files have been changed.
           - [ ] Other reason
   
     Validation performed:
   
     - `./run-fe-ut.sh --run 
org.apache.doris.datasource.jdbc.client.JdbcOceanBaseClientTest`
     - `FE_MAVEN_THREADS=1 ./build.sh --fe -j 1`
   
   - Behavior changed:
       - [ ] No.
       - [x] Yes. Temporary OceanBase compatibility-detection pools are closed 
after initialization.
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes.
   
   ### 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]

Reply via email to