Skip to content

Conversation

@deardeng
Copy link
Contributor

cherry pick from #55007

Fix
Step 1. create table include partitions, table's partitions has been add
to map (leak table lock), write editlog1
Step 2. drop partition, write editlog2
Setp 3. first replay editlog2, then replay editlog1, editlog1 toSql()
find patition by partitionId, can't find, npe

```
2025-08-15 17:39:48,792 ERROR (replayer|113) [EditLog.loadJournal():1443] replay Operation Type 10, log id: 363
java.lang.NullPointerException: Cannot invoke "org.apache.doris.catalog.Partition.getName()" because "partition" is null
        at org.apache.doris.catalog.ListPartitionInfo.toSql(ListPartitionInfo.java:164) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.Env.getDdlStmt(Env.java:4468) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.Env.getSyncedDdlStmt(Env.java:3575) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.binlog.CreateTableRecord.<init>(CreateTableRecord.java:83) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.persist.EditLog.loadJournal(EditLog.java:357) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.Env.replayJournal(Env.java:3113) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.catalog.Env$4.runOneCycle(Env.java:2875) ~[doris-fe.jar:1.2-SNAPSHOT]
        at org.apache.doris.common.util.Daemon.run(Daemon.java:119) ~[doris-fe.jar:1.2-SNAPSHOT]
```

Co-authored-by: Yongqiang YANG <yangyongqiang@selectdb.com>
@deardeng deardeng requested a review from morrySnow as a code owner September 14, 2025 12:52
@deardeng
Copy link
Contributor Author

run buildall

@Thearas
Copy link
Contributor

Thearas commented Sep 14, 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?

@deardeng deardeng closed this Sep 18, 2025
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