[fix](routine-load) fix data lost when FE leader change (#33678)
This commit is contained in:
committed by
yiguolei
parent
53a3d6c154
commit
dac2829194
@ -1250,7 +1250,13 @@ public abstract class RoutineLoadJob extends AbstractTxnStateChangeCallback impl
|
||||
@Override
|
||||
public void replayOnAborted(TransactionState txnState) {
|
||||
// attachment may be null if this task is aborted by FE
|
||||
if (txnState.getTxnCommitAttachment() != null) {
|
||||
// it need check commit info before update progress
|
||||
// for follower FE node progress may exceed correct progress
|
||||
// the data will lost if FE leader change at this moment
|
||||
if (txnState.getTxnCommitAttachment() != null
|
||||
&& checkCommitInfo((RLTaskTxnCommitAttachment) txnState.getTxnCommitAttachment(),
|
||||
txnState,
|
||||
TransactionState.TxnStatusChangeReason.fromString(txnState.getReason()))) {
|
||||
replayUpdateProgress((RLTaskTxnCommitAttachment) txnState.getTxnCommitAttachment());
|
||||
}
|
||||
this.jobStatistic.abortedTaskNum++;
|
||||
|
||||
Reference in New Issue
Block a user