Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,18 @@ public FailureReason(InternalErrorCode errCode, String msg) {

public FailureReason(String msg) {
this.msg = msg;
if (StringUtils.isNotEmpty(msg) && msg.contains("Insert has filtered data in strict mode")) {
if (StringUtils.isNotEmpty(msg) && isTooManyFailureRowsErr(msg)) {
this.code = InternalErrorCode.TOO_MANY_FAILURE_ROWS_ERR;
} else {
this.code = InternalErrorCode.INTERNAL_ERR;
}
}

private static boolean isTooManyFailureRowsErr(String msg) {
return msg.contains("Insert has filtered data in strict mode")
|| msg.contains("too many filtered rows");
}

public InternalErrorCode getCode() {
return code;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ private void autoResumeHandler() throws JobException {
if (autoResumeCount < Long.MAX_VALUE) {
streamingInsertJob.setAutoResumeCount(autoResumeCount + 1);
}
streamingInsertJob.resetFailureInfo(null);
streamingInsertJob.updateJobStatus(JobStatus.PENDING);
return;
}
Expand Down