caiconghui commented on a change in pull request #3775:
URL: https://github.com/apache/incubator-doris/pull/3775#discussion_r531470228



##########
File path: fe/fe-core/src/main/java/org/apache/doris/backup/BackupHandler.java
##########
@@ -274,25 +274,25 @@ private void backup(Repository repository, Database db, 
BackupStmt stmt) throws
         // This is just a pre-check to avoid most of invalid backup requests.
         // Also calculate the signature for incremental backup check.
         List<TableRef> tblRefs = stmt.getTableRefs();
-        BackupMeta curBackupMeta = null;
-        db.readLock();
-        try {
-            List<Table> backupTbls = Lists.newArrayList();
-            for (TableRef tblRef : tblRefs) {
-                String tblName = tblRef.getName().getTbl();
-                Table tbl = db.getTable(tblName);
-                if (tbl == null) {
-                    
ErrorReport.reportDdlException(ErrorCode.ERR_BAD_TABLE_ERROR, tblName);
-                }
-                if (tbl.getType() != TableType.OLAP) {
-                    
ErrorReport.reportDdlException(ErrorCode.ERR_NOT_OLAP_TABLE, tblName);
-                }
 
-                OlapTable olapTbl = (OlapTable) tbl;
+        List<Table> backupTbls = Lists.newArrayList();
+        for (TableRef tblRef : tblRefs) {
+            String tblName = tblRef.getName().getTbl();
+            Table tbl = db.getTable(tblName);

Review comment:
       if use getOrThrowException, should cast MetaNotFoundException to 
DdlException, or should change to much throw exception declaraction from Ddl 
exception to MetaNotFoundException




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to