Skip to content

Commit

Permalink
[Fix](show-load)Show load npe(userinfo is null) (#27698) (#27719)
Browse files Browse the repository at this point in the history
  • Loading branch information
CalvinKirs authored Nov 28, 2023
1 parent b43e28a commit 36f3374
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 @@ -819,8 +819,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 @@ -568,8 +568,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 36f3374

Please sign in to comment.