[fix](test) Stabilize lineage skip internal schema test#65235
Open
seawinde wants to merge 1 commit into
Open
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Member
Author
|
run buildall |
Contributor
TPC-H: Total hot run time: 29371 ms |
Contributor
TPC-DS: Total hot run time: 179078 ms |
Contributor
ClickBench: Total hot run time: 25.1 s |
### What problem does this PR solve?
Issue Number: None
Related PR: None
Problem Summary: LineageUtilsSkipTest enabled the background internal schema initializer before starting the mocked FE cluster, then manually initialized the internal schema in the test method. On slow FE UT runs this could race with other DDL and make createDatabase fail to acquire the catalog lock within the 5 second tryLock timeout. This change keeps the background initializer disabled for the UT and synchronously creates the internal schema in runBeforeAll, matching existing internal schema test setup.
### Release note
None
### Check List (For Author)
- Test: Unit Test
- ./run-fe-ut.sh --run org.apache.doris.nereids.lineage.LineageUtilsSkipTest#testSkipInternalSchemaInsert
- Behavior changed: No
- Does this need documentation: No
22ed91d to
c027671
Compare
Member
Author
|
run buildall |
Contributor
TPC-H: Total hot run time: 29497 ms |
Contributor
TPC-DS: Total hot run time: 181269 ms |
Contributor
ClickBench: Total hot run time: 25.04 s |
morrySnow
approved these changes
Jul 9, 2026
Contributor
|
/review |
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
Contributor
There was a problem hiding this comment.
Automated review completed for PR 65235 at head c0276717ba482eb26bb240deece5842a5b576b43.
No inline issues found.
Critical checkpoint conclusions:
- Goal and scope: The change is narrowly scoped to
LineageUtilsSkipTestfixture setup. It keeps the backgroundInternalSchemaInitializerdisabled during mocked FE startup and creates the internal schema synchronously inrunBeforeAll(), which matches the stated stabilization goal. - Test evidence: The PR reports
./run-fe-ut.sh --run org.apache.doris.nereids.lineage.LineageUtilsSkipTest#testSkipInternalSchemaInsert; GitHub FE UT and CheckStyle are passing for this head. I did not run the FE UT locally because this checkout lacks.worktree_initializedandthirdparty/installed/bin/protoc, andfe/AGENTS.mdsays to stop whenprotocis missing. - Concurrency and lifecycle: The previous race came from re-enabling
FeConstants.enableInternalSchemaDbbeforeMockedFrontend.start(), allowing the background initializer to compete with test DDL.TestWithFeService.beforeAll()now leaves that flag false before cluster creation, and the schema setup runs synchronously after the cluster exists. - Session/config state:
Config.activate_lineage_pluginis still restored after each test. The newFeConstants.runningUnitTest = truefollows existing internal-schema FE UT patterns, and FE surefire usesreuseForks=false, so I did not find a cross-test static leak issue. - Compatibility, persistence, data correctness, observability, and performance: This is test-only code; no production protocol, storage, transaction, persistence, or runtime behavior changes were found.
- Parallel paths: Existing internal-schema setup patterns in
InternalSchemaAlterTestandStmtExecutorTestalign with this approach; no missing parallel production path was identified. - CI note: One External Regression status is failing, but the changed file is a single FE unit test and I found no evidence tying that external-suite failure to this patch.
- User focus: No additional user-provided review focus was present.
Subagent conclusions:
optimizer-rewrite: No candidates. It reviewed the changed test plus lineage/insert planning paths and reportedNO_NEW_VALUABLE_FINDINGS.tests-session-config: No candidates. It reviewed test lifecycle, session/config state, style/CI context, and reported no actionable issue.- Convergence round 1: Both live subagents reviewed the same current ledger and empty proposed inline-comment set and replied
NO_NEW_VALUABLE_FINDINGS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
Issue Number: N/A
Related PR: #61004
Problem Summary:
LineageUtilsSkipTest.testSkipInternalSchemaInsertcould failintermittently in FE UT with
Failed to acquire catalog lock. Try again.Root cause: In
LineageUtilsSkipTest.beforeCluster(), the test enabledFeConstants.enableInternalSchemaDbbefore the mocked FE cluster started.This allowed the background
InternalSchemaInitializerto run during teststartup. The background initializer and the test method both performed DDL,
so they could race on the catalog lock used by
InternalCatalog.createDb().This PR keeps the background internal schema initializer disabled for the
unit test and creates the required internal schema synchronously in
runBeforeAll().LineageUtilsSkipTest.javaRelease note
None
Check List (For Author)
./run-fe-ut.sh --run org.apache.doris.nereids.lineage.LineageUtilsSkipTest#testSkipInternalSchemaInsertBehavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)