You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/01/29 02:14:50 UTC

[GitHub] [incubator-doris] EmmyMiao87 commented on a change in pull request #5314: [Backup]Support content, exclude and whole database in backup

EmmyMiao87 commented on a change in pull request #5314:
URL: https://github.com/apache/incubator-doris/pull/5314#discussion_r566528366



##########
File path: fe/fe-core/src/main/java/org/apache/doris/backup/BackupHandler.java
##########
@@ -269,10 +271,30 @@ private void backup(Repository repository, Database db, BackupStmt stmt) throws
                     + " is read only");
         }
 
+        // Determine the tables to be backed up
+        Set<String> tableNames = Sets.newHashSet();
+        AbstractBackupTableRefClause abstractBackupTableRefClause = stmt.getAbstractBackupTableRefClause();
+        if (abstractBackupTableRefClause == null) {
+            tableNames = db.getTableNamesWithLock();
+        } else if (abstractBackupTableRefClause != null && abstractBackupTableRefClause.isExclude()) {
+            tableNames = db.getTableNamesWithLock();
+            for (TableRef tableRef : abstractBackupTableRefClause.getTableRefList()) {
+                tableNames.remove(tableRef.getName().getTbl());

Review comment:
       I think it can be checked but it is not necessary to report an error.Just write a log.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org