This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit a374dfa21b13d5ccc6b6538285387664c2717130 Author: HHoflittlefish777 <[email protected]> AuthorDate: Tue Apr 16 11:18:48 2024 +0800 [fix](routine-load) fix data lost when FE leader change (#33678) --- .../java/org/apache/doris/load/routineload/RoutineLoadJob.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadJob.java b/fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadJob.java index 233d05d28b0..8c8dd7eaad9 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadJob.java +++ b/fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadJob.java @@ -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++; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
