-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Fix](create table) concurrent rename database causes table creation … #54614
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
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
…and replay failure
```
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]
```
dataroaring
approved these changes
Aug 12, 2025
Contributor
dataroaring
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Contributor
|
PR approved by at least one committer and no changes requested. |
Contributor
|
PR approved by anyone and no changes requested. |
Contributor
|
run buildall |
TPC-H: Total hot run time: 34246 ms |
TPC-DS: Total hot run time: 184397 ms |
ClickBench: Total hot run time: 32.35 s |
swjtu-zhanglei
approved these changes
Aug 13, 2025
deardeng
added a commit
to deardeng/incubator-doris
that referenced
this pull request
Sep 14, 2025
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.
deardeng
added a commit
to deardeng/incubator-doris
that referenced
this pull request
Sep 18, 2025
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.
deardeng
added a commit
to deardeng/incubator-doris
that referenced
this pull request
Sep 18, 2025
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.
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
approved
Indicates a PR has been approved by one committer.
dev/2.1.x
dev/2.1.x-conflict
dev/3.0.x
dev/3.0.x-conflict
dev/3.1.1-merged
p0_c
reviewed
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.
…and replay failure
Fix
The cause of the problem, as observed in the observer bdbje log, is as follows:
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.
What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)