Skip to content
Open
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 @@ -242,7 +242,9 @@ public boolean isFinalState() {
protected long autoResumeCount;
// some other msg which need to show to user;
protected String otherMsg = "";
@SerializedName("pauseReason")
protected ErrorReason pauseReason;
@SerializedName("cancelReason")
protected ErrorReason cancelReason;

@SerializedName("cts")
Expand Down Expand Up @@ -2000,7 +2002,8 @@ public void gsonPostProcess() throws IOException {
});
try {
ConnectContext ctx = new ConnectContext();
ctx.setDatabase(Env.getCurrentEnv().getInternalCatalog().getDb(dbId).get().getName());
ctx.setDatabase(Env.getCurrentEnv().getInternalCatalog().getDb(dbId)
.orElseThrow(() -> new Exception("Database " + dbId + " does not exist")).getName());
StatementContext statementContext = new StatementContext();
statementContext.setConnectContext(ctx);
ctx.setStatementContext(statementContext);
Expand Down Expand Up @@ -2033,6 +2036,11 @@ public void gsonPostProcess() throws IOException {
}
} catch (Exception e) {
this.state = JobState.CANCELLED;
if (this.cancelReason == null) {
String timeStr = TimeUtils.longToTimeString(System.currentTimeMillis());
this.cancelReason = new ErrorReason(InternalErrorCode.INTERNAL_ERR,
"FE restart deserialize failed at " + timeStr + ": " + e.getMessage());
}
LOG.warn("error happens when parsing create routine load stmt: " + origStmt.originStmt, e);
}
if (userIdentity != null) {
Expand Down
Loading