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

   ### What problem does this PR solve?
   
   Related PR: https://github.com/apache/doris-thirdparty/pull/380
   
   Source fix: https://github.com/selectdb/selectdb-core/pull/13238
   
   `BDBHA` creates a fresh `ReplicationGroupAdmin` for every HA operation but 
leaves it open. An SSL-backed administrator owns a certificate-monitor 
executor, so repeated metadata queries and HA operations can retain its monitor 
threads. JE `18.3.18-doris-SNAPSHOT`, already used by master, exposes `close()` 
to release these resources.
   
   Close administrators in `finally` blocks at all seven `BDBHA` call sites. 
Preserve existing return values and exception handling, and cover nested 
conflict-node removal as well as errors. The default non-SSL path retains its 
behavior.
   
   Add `BdbHaTest` with real JE administrator construction, SSL factories, 
certificate monitors and resource shutdown. Mockito spies replace only network 
RPCs. The test explicitly supplies the SSL configuration, so it exercises the 
ownership contract independently of the production administrator's default 
network configuration. Reuse the existing regression certificate and its 
matching client key converted to PKCS#8.
   
   ### Release note
   
   Release BDB JE group administrators after frontend metadata and HA 
operations, preventing certificate-monitor thread retention when using an 
SSL-backed administrator.
   
   ### Check List (For Author)
   
   - Test:
       - [x] Unit Test
       - Normal and exceptional operations, absent administrators, leader 
filtering, nested conflict removal, and 40 query cycles creating 120 
certificate monitors.
   
   All validation below ran through `local_to_dev` on the development server 
with JDK 17, using the standard `run-fe-ut.sh` entry point.
   
   | Validation | Result |
   | --- | --- |
   | Same new tests with original master `BDBHA` | 17 expected monitor-release 
assertion failures; 1 boundary pass |
   | Fixed `BdbHaTest` | 18/18 pass; all 120 monitors in the repeated-query 
test terminate |
   | Related FE/BDB/proc/statistics tests | 24 classes; 124 tests pass; 1 
existing skipped test(s); 0 failures or errors |
   | Checkstyle for the two changed Java files | Pass |
   
   The changed Java files were checked with `maven-checkstyle-plugin` 3.1.2, 
Checkstyle 9.3, and the repository's unchanged rules. A temporary POM with no 
application dependencies was used for this style-only check because 
validate-only reactor resolution could not find internal SNAPSHOT jars; both 
changed files were present in the Checkstyle XML report with zero violations. 
Compilation and unit tests used the full FE reactor through `run-fe-ut.sh`.
   
   - Behavior changed:
       - [x] Yes. Release administrator-owned resources after each completed or 
failed HA operation.
   - Does this need documentation?
       - [x] No.
   
   ### 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