-
Notifications
You must be signed in to change notification settings - Fork 3.6k
branch-3.1: [Fix](create table) concurrent rename database causes table creation and replay failure #54614 #56039
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
morrySnow
merged 1 commit into
apache:branch-3.1
from
deardeng:pick_54614_to_doris_branch-3.1
Sep 17, 2025
Merged
branch-3.1: [Fix](create table) concurrent rename database causes table creation and replay failure #54614 #56039
morrySnow
merged 1 commit into
apache:branch-3.1
from
deardeng:pick_54614_to_doris_branch-3.1
Sep 17, 2025
Conversation
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
apache#54614) …and replay failure Fix ``` 2025-08-04 01:00:20,626 ERROR (replayer|119) [EditLog.loadJournal():1439] replay Operation Type 10, log id: 62731 java.lang.NullPointerException: Cannot invoke "org.apache.doris.catalog.Database.createTableWithLock(org.apache.doris.catalog.Table, boolean, boolean)" because "db" is null at org.apache.doris.datasource.InternalCatalog.replayCreateTable(InternalCatalog.java:1359) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.catalog.Env.replayCreateTable(Env.java:4767) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.persist.EditLog.loadJournal(EditLog.java:351) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.catalog.Env.replayJournal(Env.java:3103) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.catalog.Env$4.runOneCycle(Env.java:2865) ~[doris-fe.jar:1.2-SNAPSHOT] at org.apache.doris.common.util.Daemon.run(Daemon.java:119) ~[doris-fe.jar:1.2-SNAPSHOT] ``` The cause of the problem, as observed in the observer bdbje log, is as follows: 1. Key:10, Rename db from dbA to dbB 2. Key:11, Rename db from dbB to dbA 3. key:12, The edit log for create view (table) saves the db name dbB from step 1. During replay, because the db has become dbA, replay cannot find the dbB by using the name dbB, resulting in an error (npe). The follower crashed.
Contributor
Author
|
run buildall |
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
TPC-H: Total hot run time: 32523 ms |
TPC-DS: Total hot run time: 192894 ms |
ClickBench: Total hot run time: 28.48 s |
Collaborator
|
run fe_ut |
Contributor
FE UT Coverage ReportIncrement line coverage |
gavinchou
approved these changes
Sep 17, 2025
morrySnow
approved these changes
Sep 17, 2025
Closed
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.
cherry pick from #54614