Skip to content

Conversation

@deardeng
Copy link
Contributor

cherry pick from #54614

@deardeng
Copy link
Contributor Author

run buildall

@Thearas
Copy link
Contributor

Thearas commented Sep 18, 2025

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

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 deardeng force-pushed the pick_54614_to_doris_branch-3.0 branch from a74ac48 to b3f0c93 Compare September 18, 2025 11:23
@deardeng
Copy link
Contributor Author

run buildall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants