Skip to content

Commit

Permalink
[Fix](show-load)Show load npe(userinfo is null) (apache#27698)
Browse files Browse the repository at this point in the history
  • Loading branch information
CalvinKirs authored Nov 28, 2023
1 parent f54db85 commit c6f43e4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -826,8 +826,12 @@ public List<Comparable> getShowInfo() throws DdlException {
jobInfo.add(transactionId);
// error tablets
jobInfo.add(errorTabletsToJson());
// user
jobInfo.add(userInfo.getQualifiedUser());
// user, some load job may not have user info
if (userInfo == null || userInfo.getQualifiedUser() == null) {
jobInfo.add(FeConstants.null_string);
} else {
jobInfo.add(userInfo.getQualifiedUser());
}
// comment
jobInfo.add(comment);
return jobInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,8 +572,9 @@ public List<List<Comparable>> getLoadJobInfosByDb(long dbId, String labelValue,
}
// add load job info
loadJobInfos.add(loadJob.getShowInfo());
} catch (DdlException e) {
continue;
} catch (RuntimeException | DdlException e) {
// ignore this load job
LOG.warn("get load job info failed. job id: {}", loadJob.getId(), e);
}
}
return loadJobInfos;
Expand Down

0 comments on commit c6f43e4

Please sign in to comment.