Skip to content

Commit

Permalink
[fix](routine-load) optimize error msg when meet out of range (apache…
Browse files Browse the repository at this point in the history
  • Loading branch information
sollhui authored and caiconghui1 committed Feb 2, 2024
1 parent 87ee065 commit eb81fcb
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1124,11 +1124,24 @@ public void afterAborted(TransactionState txnState, boolean txnOperated, String
if (txnStatusChangeReasonString != null) {
txnStatusChangeReason =
TransactionState.TxnStatusChangeReason.fromString(txnStatusChangeReasonString);
String msg;
if (txnStatusChangeReason != null) {
switch (txnStatusChangeReason) {
case OFFSET_OUT_OF_RANGE:
msg = "be " + taskBeId + " abort task,"
+ " task id: " + routineLoadTaskInfo.getId()
+ " job id: " + routineLoadTaskInfo.getJobId()
+ " with reason: " + txnStatusChangeReasonString
+ " the offset used by job does not exist in kafka,"
+ " please check the offset,"
+ " using the Alter ROUTINE LOAD command to modify it,"
+ " and resume the job";
updateState(JobState.PAUSED,
new ErrorReason(InternalErrorCode.TASKS_ABORT_ERR, msg),
false /* not replay */);
return;
case PAUSE:
String msg = "be " + taskBeId + " abort task "
msg = "be " + taskBeId + " abort task "
+ "with reason: " + txnStatusChangeReasonString;
updateState(JobState.PAUSED,
new ErrorReason(InternalErrorCode.TASKS_ABORT_ERR, msg),
Expand Down

0 comments on commit eb81fcb

Please sign in to comment.