Skip to content

[Bug] Unhandled exception may cause data inconsistency #11018

@TsukiokaKogane

Description

@TsukiokaKogane

Search before asking

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

Version

0.14

What's Wrong?

During a broker load job, after the txn is COMMITTED, there was something going wrong in BrokerLoadJob.writeProfile() and it threw an exception. And the thrown exception causing the broker load job's txn is COMMITTED in the coordinator FE, but VISIBLE in other FE.
The problem is caused by in DatabaseTransactionMgr.finishTransaction(): transactionState.afterStateTransform() threw an exception on coordinator FE. Before that happened, DatabaseTransactionMgr.unprotectUpsertTransactionState() add VISIBLE state log to editLog making other FE mark the txn VISIBLE. However, after the exception happened, the coordinator FE's txn state still remains COMMITTED.

What You Expected?

the broker load job txn should be either VISIBLE or otherwise at the same time in all FE.

How to Reproduce?

throw an exception in BrokerLoadJob.writeProfile()。

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