[fix](routine-load) optimize error msg when meet out of range (#30118)
This commit is contained in:
committed by
yiguolei
parent
9a58cacf0f
commit
d0dd090458
@ -1142,11 +1142,24 @@ public abstract class RoutineLoadJob extends AbstractTxnStateChangeCallback impl
|
||||
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),
|
||||
|
||||
Reference in New Issue
Block a user