Skip to content

[Bug] IndexChangeJob stuck on WAITING_TXN state #60746

@Yulei-Yang

Description

@Yulei-Yang

Search before asking

  • I had searched in the issues and found no similar issues.

Version

2.1.11 & master

What's Wrong?

IndexChangeJob created by build index command stuck and never finished/terminated.
fe.log shows that these jobs always under processed.

2026-02-12 16:28:33,927 INFO (schema-change-pool-9|662) [IndexChangeJob.runWaitingTxnJob():297] previous transactions are all finished, begin to send build or delete inverted index file tasks.job: 372540980, is delete: true
2026-02-12 16:28:34,428 INFO (schema-change-pool-8|661) [IndexChangeJob.runWaitingTxnJob():297] previous transactions are all finished, begin to send build or delete inverted index file tasks.job: 372540980, is delete: true
2026-02-12 16:28:34,929 INFO (schema-change-pool-5|658) [IndexChangeJob.runWaitingTxnJob():297] previous transactions are all finished, begin to send build or delete inverted index file tasks.job: 372540980, is delete: true
2026-02-12 16:28:35,430 INFO (schema-change-pool-8|661) [IndexChangeJob.runWaitingTxnJob():297] previous transactions are all finished, begin to send build or delete inverted index file tasks.job: 372540980, is delete: true
2026-02-12 16:28:35,930 INFO (schema-change-pool-4|657) [IndexChangeJob.runWaitingTxnJob():297] previous transactions are all finished, begin to send build or delete inverted index file tasks.job: 372540980, is delete: true

Trace the thread shows there exist NPE:

    `---[93.042899ms] org.apache.doris.alter.IndexChangeJob:runWaitingTxnJob() [throws Exception]
        +---[0.00% 0.001489ms ] com.google.common.base.Preconditions:checkState() #287
        +---[0.01% 0.010248ms ] org.apache.doris.alter.IndexChangeJob:isPreviousLoadFinished() #289
        +---[0.08% 0.073298ms ] org.apache.logging.log4j.Logger:info() #297
        +---[0.00% 8.58E-4ms ] org.apache.doris.catalog.Env:getCurrentInternalCatalog() #299
        +---[0.00% 0.001006ms ] org.apache.doris.datasource.InternalCatalog:getDbOrException() #300
        +---[0.00% 8.88E-4ms ] org.apache.doris.catalog.Database:getTableOrMetaException() #303
        +---[50.68% 47.150916ms ] org.apache.doris.alter.IndexChangeJob:checkTableStable() #308
        +---[49.07% 45.654057ms ] org.apache.doris.catalog.OlapTable:readLock() #312
        +---[0.08% 0.074283ms ] org.apache.doris.catalog.OlapTable:getSchemaByIndexId() #314 [throws Exception]
        +---[0.00% 0.002366ms ] org.apache.doris.catalog.OlapTable:readUnlock() #348
        `---throw:java.lang.NullPointerException #922 [null]

What You Expected?

Fix it

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions