Skip to content

Replay update replica failed when table has been dropped #5687

@EmmyMiao87

Description

@EmmyMiao87

Describe the bug

2021-04-21 16:40:13,930 INFO (stateListener|86) [EditLog.loadJournal():177] Begin to unprotect create table. db = default_cluster:kadm table = 3106512
2021-04-21 16:40:14,022 INFO (stateListener|86) [SchemaChangeJobV2.replayPending():709] replay pending schema change job: 3112634, table id: 3106512
2021-04-21 16:40:14,080 INFO (stateListener|86) [SchemaChangeJobV2.replayWaitingTxn():738] replay waiting txn schema change job: 3112634, table id: 3106512
2021-04-21 16:40:14,097 INFO (stateListener|86) [EditLog.loadJournal():196] Begin to unprotect drop table. db = default_cluster:kadm table = 3106512
2021-04-21 16:40:14,098 INFO (stateListener|86) [CatalogRecycleBin.recycleTable():104] recycle table[3106512-kadm_waybill_detail_describething]
2021-04-21 16:40:14,098 INFO (stateListener|86) [Catalog.unprotectDropTable():4465] finished dropping table[kadm_waybill_detail_describething] in db[default_cluster:kadm]
2021-04-21 16:40:14,098 WARN (stateListener|86) [Catalog.replayUpdateReplica():4549] olap table is null when update repica, table id: 3106512 partition id: 3106487 index id: 3112635 index id: 3112635 tablet id: 3115544 backend id: 12003 replica id: 3115545 version: 1 version hash: 0 schema hash: -1 data size: 0 row count: 0 last failed version: -1 last failed version hash: 0 last success version: 1 last success version hash: 0
2021-04-21 16:40:14,098 ERROR (stateListener|86) [EditLog.loadJournal():808] Operation Type 45
java.lang.NullPointerException: null
at org.apache.doris.catalog.Catalog.replayUpdateReplica(Catalog.java:4551) ~[palo-fe.jar:3.4.0]
at org.apache.doris.persist.EditLog.loadJournal(EditLog.java:408) [palo-fe.jar:3.4.0]
at org.apache.doris.catalog.Catalog.replayJournal(Catalog.java:2482) [palo-fe.jar:3.4.0]
at org.apache.doris.catalog.Catalog.transferToMaster(Catalog.java:1180) [palo-fe.jar:3.4.0]
at org.apache.doris.catalog.Catalog.access$1100(Catalog.java:270) [palo-fe.jar:3.4.0]
at org.apache.doris.catalog.Catalog$4.runOneCycle(Catalog.java:2399) [palo-fe.jar:3.4.0]
at org.apache.doris.common.util.Daemon.run(Daemon.java:116) [palo-fe.jar:3.4.0]

To Reproduce
Steps to reproduce the behavior:
Version 0.14.7

  1. create table
  2. schema change
  3. drop table before schema change finished
  4. restart fe
  5. failed to start fe

Expected behavior
Tables that no longer exist should no longer be modified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/catalogIssues or PRs related to catalog managementkind/fixCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions