diff --git a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java index bfce1a8f7a..34050c2dce 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java +++ b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java @@ -1108,6 +1108,10 @@ public class FrontendServiceImpl implements FrontendService.Iface { status.setStatusCode(TStatusCode.LABEL_ALREADY_EXISTS); status.addToErrorMsgs(e.getMessage()); result.setJobStatus(e.getJobStatus()); + } catch (MetaNotFoundException e) { + LOG.warn("failed to begin", e); + status.setStatusCode(TStatusCode.NOT_FOUND); + status.addToErrorMsgs(e.getMessage()); } catch (UserException e) { LOG.warn("failed to begin: {}", e.getMessage()); status.setStatusCode(TStatusCode.ANALYSIS_ERROR); @@ -1145,7 +1149,7 @@ public class FrontendServiceImpl implements FrontendService.Iface { if (Strings.isNullOrEmpty(request.getCluster())) { dbName = request.getDb(); } - throw new UserException("unknown database, database=" + dbName); + throw new MetaNotFoundException("unknown database, database=" + dbName); } OlapTable table = (OlapTable) db.getTableOrMetaException(request.tbl, TableType.OLAP); @@ -1249,7 +1253,7 @@ public class FrontendServiceImpl implements FrontendService.Iface { if (Strings.isNullOrEmpty(request.getCluster())) { dbName = request.getDb(); } - throw new UserException("unknown database, database=" + dbName); + throw new MetaNotFoundException("unknown database, database=" + dbName); } // step 4: fetch all tableIds @@ -1679,6 +1683,11 @@ public class FrontendServiceImpl implements FrontendService.Iface { } try { loadTxnRollbackImpl(request); + } catch (MetaNotFoundException e) { + String msg = "failed to rollback txn" + request.getTxnId(); + LOG.warn(msg, e); + status.setStatusCode(TStatusCode.NOT_FOUND); + status.addToErrorMsgs(e.getMessage()); } catch (UserException e) { LOG.warn("failed to rollback txn {}: {}", request.getTxnId(), e.getMessage()); status.setStatusCode(TStatusCode.ANALYSIS_ERROR);