branch-4.1: [fix](test) stabilize BDB unmatched transaction test#65757
branch-4.1: [fix](test) stabilize BDB unmatched transaction test#65757shuke987 wants to merge 1 commit into
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
run buildall |
|
/review |
There was a problem hiding this comment.
Reviewed PR 65757. I did not find a correctness issue to raise.
The change is test-only and focused on stabilizing BDBEnvironmentTest.testReadTxnIsNotMatched: follower visibility now waits for the exact baseline key/value, the temporary JE RepImpl spy is restored before shutdown/reopen, and the reopened former master must contain the exact locally committed key/value.
Critical checkpoint conclusions:
- Goal/test proof: satisfied for the intended local-commit-after-ack-failure invariant.
- Scope: one focused FE test file; no production behavior changes.
- Concurrency/lifecycle: bounded follower polling handles asynchronous replay, cached database handles are reused, and both JE implementation fields are restored in
finallybefore lifecycle operations. - Branch compatibility: branch-4.1 already declares Awaitility and Mockito 4.11 core/inline, and its pinned Doris JE fields and hook signature match the reflection/stub.
- Persistence/result correctness: JE logs the commit before the injected post-commit exception; after reopen the test checks count + 1, the exact key, and exact value bytes.
- Config/protocol/security/observability/data-write behavior: no production surface is changed.
- Parallel/special paths: allowing normal VLSN registration and possible follower delivery is intentional because acknowledgement failure does not imply non-delivery.
- Test coverage: strengthened against follower replay races and false-positive value checks.
- User focus: no additional user-provided review focus.
Validation was static only, as required by the review-runner contract. The exact PR range passes git diff --check. I did not run builds or FE tests because thirdparty/installed and thirdparty/installed/bin/protoc are absent; the PR reports the focused target test passed twice locally.
What problem does this PR solve?
Issue Number: None
Related PR: #65587
Problem Summary:
Backport the stabilization of
BDBEnvironmentTest.testReadTxnIsNotMatchedtobranch-4.1. The release-branch test partially mocked a live JERepImplwith JMockit, which could miss or interceptregisterVLSNinconsistently while BDB background threads were active. It also read follower state before asynchronous replication was guaranteed visible.This tailored pick waits for the baseline value on followers, uses a method-scoped Mockito spy that throws only from
postLogCommitHook, restores both original JE environment fields infinally, and verifies the exact locally committed value after restart.Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Validation:
git diff --checkpassed.Check List (For Reviewer who merge this PR)