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 Jan 22, 2024
1 parent 75c0d6c commit 27f64c5
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1142,11 +1142,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 27f64c5

Please sign in to comment.