Skip to content

branch-4.0: [fix](test) Fix BDB JE resource leak in BDBEnvironmentTest causing FE UT timeout #61404#61412

Merged
yiguolei merged 1 commit intobranch-4.0from
auto-pick-61404-branch-4.0
Mar 18, 2026
Merged

branch-4.0: [fix](test) Fix BDB JE resource leak in BDBEnvironmentTest causing FE UT timeout #61404#61412
yiguolei merged 1 commit intobranch-4.0from
auto-pick-61404-branch-4.0

Conversation

@github-actions
Copy link
Contributor

Cherry-picked from #61404

… UT timeout (#61404)

### What problem does this PR solve?

The following resource leak issues in BDBEnvironmentTest cause BDB JE
checkpoint threads to enter an infinite VLSN consistency retry loop
during JVM shutdown, blocking the Maven Surefire process from exiting
and triggering TeamCity execution timeout (~3 hours):

1. testReadTxnIsNotMatched: reopens BDB JE master environment and
database at the end but never closes them.

2. testRollbackException: has an early 'return' when fe1 is elected as
master, which exits the method without closing any of the 3 BDB JE
environments.

Fix by wrapping the test logic of both multi-node cluster tests
(testRollbackException, testReadTxnIsNotMatched) with try/finally blocks
that guarantee all BDB JE environments are closed, regardless of whether
the test passes, fails an assertion, or returns early.
@Thearas
Copy link
Contributor

Thearas commented Mar 17, 2026

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

@dataroaring dataroaring reopened this Mar 17, 2026
@dataroaring dataroaring requested a review from yiguolei as a code owner March 17, 2026 03:27
@Thearas
Copy link
Contributor

Thearas commented Mar 17, 2026

run buildall

@yiguolei yiguolei merged commit cf95c94 into branch-4.0 Mar 18, 2026
26 of 29 checks passed
@github-actions github-actions bot deleted the auto-pick-61404-branch-4.0 branch March 18, 2026 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants