Skip to content

Commit c6f43e4

Browse files
authored
[Fix](show-load)Show load npe(userinfo is null) (#27698)
1 parent f54db85 commit c6f43e4

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

‎fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadJob.java‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -826,8 +826,12 @@ public List<Comparable> getShowInfo() throws DdlException {
826826
jobInfo.add(transactionId);
827827
// error tablets
828828
jobInfo.add(errorTabletsToJson());
829-
// user
830-
jobInfo.add(userInfo.getQualifiedUser());
829+
// user, some load job may not have user info
830+
if (userInfo == null || userInfo.getQualifiedUser() == null) {
831+
jobInfo.add(FeConstants.null_string);
832+
} else {
833+
jobInfo.add(userInfo.getQualifiedUser());
834+
}
831835
// comment
832836
jobInfo.add(comment);
833837
return jobInfo;

‎fe/fe-core/src/main/java/org/apache/doris/load/loadv2/LoadManager.java‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,8 +572,9 @@ public List<List<Comparable>> getLoadJobInfosByDb(long dbId, String labelValue,
572572
}
573573
// add load job info
574574
loadJobInfos.add(loadJob.getShowInfo());
575-
} catch (DdlException e) {
576-
continue;
575+
} catch (RuntimeException | DdlException e) {
576+
// ignore this load job
577+
LOG.warn("get load job info failed. job id: {}", loadJob.getId(), e);
577578
}
578579
}
579580
return loadJobInfos;

0 commit comments

Comments
 (0)