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 2022/04/08 08:38:58 UTC

[GitHub] [incubator-doris] ChPi opened a new pull request, #8921: [Bug] fix backup timeout on a table without partition

ChPi opened a new pull request, #8921:
URL: https://github.com/apache/incubator-doris/pull/8921

   # Proposed changes
   
   Issue Number: close #8886 
   
   ## Problem Summary:
   
   backup job skips the table which has no partition
   
   ## Checklist(Required)
   
   1. Does it affect the original behavior: (No)
   2. Has unit tests been added: (No)
   3. Has document been added or modified: (No)
   4. Does it need to update dependencies: (No)
   5. Are there any changes that cannot be rolled back: (No)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


[GitHub] [doris] ChPi commented on a diff in pull request #8921: [Bug] fix backup timeout on a table without partition

Posted by GitBox <gi...@apache.org>.
ChPi commented on code in PR #8921:
URL: https://github.com/apache/doris/pull/8921#discussion_r943323205


##########
fe/fe-core/src/main/java/org/apache/doris/backup/BackupJob.java:
##########
@@ -358,6 +358,18 @@ private void prepareAndSendSnapshotTask() {
         taskProgress.clear();
         taskErrMsg.clear();
         AgentBatchTask batchTask = new AgentBatchTask();
+
+        // remove table which has no partition
+        tableRefs = tableRefs.stream().filter(tableRef -> {
+            String tblName = tableRef.getName().getTbl();
+            Table tbl = db.getTableNullable(tblName);
+            if (tbl != null && tbl.getType() == TableType.OLAP) {
+                OlapTable olapTable = (OlapTable) tbl;
+                return !olapTable.getAllPartitions().isEmpty();

Review Comment:
   @yangzhg are there any questions about table without partition?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


[GitHub] [doris] github-actions[bot] closed pull request #8921: [Bug] fix backup timeout on a table without partition

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #8921: [Bug] fix backup timeout on a table without partition
URL: https://github.com/apache/doris/pull/8921


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


[GitHub] [incubator-doris] ChPi commented on pull request #8921: [Bug] fix backup timeout on a table without partition

Posted by GitBox <gi...@apache.org>.
ChPi commented on PR #8921:
URL: https://github.com/apache/incubator-doris/pull/8921#issuecomment-1103427411

   this pr is fix the bug which a user creates a table without partition,and the developer backups the database will timeout。


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


[GitHub] [incubator-doris] yangzhg commented on a diff in pull request #8921: [Bug] fix backup timeout on a table without partition

Posted by GitBox <gi...@apache.org>.
yangzhg commented on code in PR #8921:
URL: https://github.com/apache/incubator-doris/pull/8921#discussion_r847892735


##########
fe/fe-core/src/main/java/org/apache/doris/backup/BackupJob.java:
##########
@@ -358,6 +358,18 @@ private void prepareAndSendSnapshotTask() {
         taskProgress.clear();
         taskErrMsg.clear();
         AgentBatchTask batchTask = new AgentBatchTask();
+
+        // remove table which has no partition
+        tableRefs = tableRefs.stream().filter(tableRef -> {
+            String tblName = tableRef.getName().getTbl();
+            Table tbl = db.getTableNullable(tblName);
+            if (tbl != null && tbl.getType() == TableType.OLAP) {
+                OlapTable olapTable = (OlapTable) tbl;
+                return !olapTable.getAllPartitions().isEmpty();

Review Comment:
   What kind of table does not have a partition?



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


[GitHub] [incubator-doris] ChPi commented on a diff in pull request #8921: [Bug] fix backup timeout on a table without partition

Posted by GitBox <gi...@apache.org>.
ChPi commented on code in PR #8921:
URL: https://github.com/apache/incubator-doris/pull/8921#discussion_r850254962


##########
fe/fe-core/src/main/java/org/apache/doris/backup/BackupJob.java:
##########
@@ -358,6 +358,18 @@ private void prepareAndSendSnapshotTask() {
         taskProgress.clear();
         taskErrMsg.clear();
         AgentBatchTask batchTask = new AgentBatchTask();
+
+        // remove table which has no partition
+        tableRefs = tableRefs.stream().filter(tableRef -> {
+            String tblName = tableRef.getName().getTbl();
+            Table tbl = db.getTableNullable(tblName);
+            if (tbl != null && tbl.getType() == TableType.OLAP) {
+                OlapTable olapTable = (OlapTable) tbl;
+                return !olapTable.getAllPartitions().isEmpty();

Review Comment:
   user creates a table like #8886, not create partition or  drops the partition.



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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


[GitHub] [doris] github-actions[bot] commented on pull request #8921: [Bug] fix backup timeout on a table without partition

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #8921:
URL: https://github.com/apache/doris/pull/8921#issuecomment-1421678089

   We're closing this PR because it hasn't been updated in a while.
   This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you'd like to revive this PR, please reopen it and feel free a maintainer to remove the Stale tag!


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

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