branch-4.0: [fix](test) stabilize BDB unmatched transaction test#65758
branch-4.0: [fix](test) stabilize BDB unmatched transaction test#65758shuke987 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 65758. I did not find a correctness issue to raise.
This test-only backport is focused on stabilizing BDBEnvironmentTest.testReadTxnIsNotMatched: follower visibility now waits for the exact replicated key/value, the temporary RepImpl spy is confined to the injected write and both JE handle fields are restored in finally, and the reopened old master verifies the exact locally committed value.
Critical checkpoint conclusions:
- Goal and result proof: satisfied for the intended test stabilization; the exact JE commit path logs the local commit before the mocked post-commit acknowledgement failure, and the final count/key/value checks prove recovery of that record.
- Scope: one FE test file with no production behavior change.
- Concurrency and lifecycle: asynchronous follower visibility, spy/original state routing, restoration, ordinary close, and fresh reopen were traced; no actionable regression remains.
- Compatibility, configuration, protocol, persistence, FE/BE variables, observability, and data-write behavior: no production contract or runtime path is changed.
- Parallel and special-case paths: no production or parallel test path requires a matching change.
- Test coverage and assertion quality: the new polling condition and byte-array assertion strengthen the intended invariant without assuming that an insufficient acknowledgement means followers did not receive the record.
- User focus: no additional user-provided review focus.
Validation was static only. The review prompt prohibits builds, and this checkout is missing thirdparty/installed and thirdparty/installed/bin/protoc. The author reports the focused FE unit test passed twice locally; the live FE UT and compile checks were still pending at review time. The repository code-review SKILL.md referenced by the runner instructions was not present in this checkout, so the bundled review contract was applied directly.
FE UT Coverage ReportIncrement line coverage `` 🎉 |
What problem does this PR solve?
Issue Number: None
Related PR: #65587
Problem Summary:
Backport the stabilization of
BDBEnvironmentTest.testReadTxnIsNotMatchedtobranch-4.0. 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)