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/11/19 06:41:11 UTC

[GitHub] [incubator-doris] caiconghui opened a new pull request #7155: [Config] Set default value to 1 for max_query_retry_time and add decommissioned backend to unavailable backend list when do simple query plan to make Doris more robust

caiconghui opened a new pull request #7155:
URL: https://github.com/apache/incubator-doris/pull/7155


   ## Proposed changes
   
   Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
   
   ## Types of changes
   
   What types of changes does your code introduce to Doris?
   _Put an `x` in the boxes that apply_
   
   - [ ] Bugfix (non-breaking change which fixes an issue)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [ ] Documentation Update (if none of the other choices apply)
   - [ ] Code refactor (Modify the code structure, format the code, etc...)
   - [x] Optimization. Including functional usability improvements and performance improvements.
   - [ ] Dependency. Such as changes related to third-party components.
   - [ ] Other.
   
   ## Checklist
   
   _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
   
   - [ ] I have created an issue on (Fix #ISSUE) and described the bug/feature there in detail
   - [ ] Compiling and unit tests pass locally with my changes
   - [ ] I have added tests that prove my fix is effective or that my feature works
   - [ ] If these changes need document changes, I have updated the document
   - [ ] Any dependent changes have been merged
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 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] [incubator-doris] caiconghui commented on a change in pull request #7155: [Config] Support disable query and load for backend to make Doris more robust and set default value to 1 for max_query_retry_time

Posted by GitBox <gi...@apache.org>.
caiconghui commented on a change in pull request #7155:
URL: https://github.com/apache/incubator-doris/pull/7155#discussion_r756980089



##########
File path: fe/fe-core/src/main/java/org/apache/doris/analysis/ModifyBackendClause.java
##########
@@ -17,6 +17,7 @@
 
 package org.apache.doris.analysis;
 
+import org.apache.commons.lang3.StringUtils;

Review comment:
       ok




-- 
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] morningman merged pull request #7155: [Config] Support disable query and load for backend to make Doris more robust and set default value to 1 for max_query_retry_time

Posted by GitBox <gi...@apache.org>.
morningman merged pull request #7155:
URL: https://github.com/apache/incubator-doris/pull/7155


   


-- 
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] caiconghui commented on a change in pull request #7155: [Config] Support disable query and load for backend to make Doris more robust and set default value to 1 for max_query_retry_time

Posted by GitBox <gi...@apache.org>.
caiconghui commented on a change in pull request #7155:
URL: https://github.com/apache/incubator-doris/pull/7155#discussion_r756994075



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/MetadataViewer.java
##########
@@ -84,7 +84,7 @@
                             
                             ReplicaStatus status = ReplicaStatus.OK;
                             Backend be = infoService.getBackend(replica.getBackendId());
-                            if (be == null || !be.isAvailable() || replica.isBad()) {
+                            if (be == null || !be.isAlive() || replica.isBad()) {

Review comment:
       replica is normal when be is alive,here when be is under decommission,it can still provide normal service




-- 
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] caiconghui commented on a change in pull request #7155: [Config] Support disable query and load for backend to make Doris more robust and set default value to 1 for max_query_retry_time

Posted by GitBox <gi...@apache.org>.
caiconghui commented on a change in pull request #7155:
URL: https://github.com/apache/incubator-doris/pull/7155#discussion_r757193119



##########
File path: fe/fe-core/src/main/java/org/apache/doris/clone/BackendLoadStatistic.java
##########
@@ -175,7 +175,7 @@ public void init() throws LoadBalanceException {
             throw new LoadBalanceException("backend " + beId + " does not exist");
         }
 
-        isAvailable = be.isAvailable();
+        isAvailable = be.isLoadAvailable();

Review comment:
       ok, I will fix it




-- 
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] morningman commented on a change in pull request #7155: [Config] Set default value to 1 for max_query_retry_time and add decommissioned backend to unavailable backend list when do simple query plan to make Doris more robust

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #7155:
URL: https://github.com/apache/incubator-doris/pull/7155#discussion_r752898623



##########
File path: fe/fe-core/src/main/java/org/apache/doris/qe/SimpleScheduler.java
##########
@@ -195,7 +195,7 @@ public static void addToBlacklist(Long backendID, String reason) {
     }
 
     public static boolean isAvailable(Backend backend) {
-        return (backend != null && backend.isAlive() && !blacklistBackends.containsKey(backend.getId()));
+        return (backend != null && backend.isAvailable() && !blacklistBackends.containsKey(backend.getId()));

Review comment:
       This method maybe used for load process. And for load, the decommission backend is still able to load data.
   So in order to minimize the impact, we can only make this judgment for the **query** request.




-- 
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] caiconghui commented on a change in pull request #7155: [Config] Set default value to 1 for max_query_retry_time and add decommissioned backend to unavailable backend list when do simple query plan to make Doris more robust

Posted by GitBox <gi...@apache.org>.
caiconghui commented on a change in pull request #7155:
URL: https://github.com/apache/incubator-doris/pull/7155#discussion_r752899291



##########
File path: fe/fe-core/src/main/java/org/apache/doris/qe/SimpleScheduler.java
##########
@@ -195,7 +195,7 @@ public static void addToBlacklist(Long backendID, String reason) {
     }
 
     public static boolean isAvailable(Backend backend) {
-        return (backend != null && backend.isAlive() && !blacklistBackends.containsKey(backend.getId()));
+        return (backend != null && backend.isAvailable() && !blacklistBackends.containsKey(backend.getId()));

Review comment:
       ok




-- 
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] github-actions[bot] commented on pull request #7155: [Config] Support disable query and load for backend to make Doris more robust and set default value to 1 for max_query_retry_time

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7155:
URL: https://github.com/apache/incubator-doris/pull/7155#issuecomment-981391984


   PR approved by anyone and no changes requested.


-- 
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] morningman commented on a change in pull request #7155: [Config] Support disable query and load for backend to make Doris more robust and set default value to 1 for max_query_retry_time

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #7155:
URL: https://github.com/apache/incubator-doris/pull/7155#discussion_r755805485



##########
File path: fe/fe-core/src/main/java/org/apache/doris/analysis/ModifyBackendClause.java
##########
@@ -17,6 +17,7 @@
 
 package org.apache.doris.analysis;
 
+import org.apache.commons.lang3.StringUtils;

Review comment:
       import order

##########
File path: fe/fe-core/src/main/java/org/apache/doris/system/SystemInfoService.java
##########
@@ -759,8 +775,10 @@ public void releaseBackends(String clusterName, boolean isReplay) {
         return chosenBackendIds;
     }
 
-    public List<Long> seqChooseBackendIdsByStorageMediumAndTag(int backendNum, boolean needAlive, boolean isCreate,
-                                                               String clusterName, TStorageMedium storageMedium, Tag tag) {
+    public List<Long> seqChooseBackendIdsByStorageMediumAndTag(int backendNum, boolean scheduleAvailable,

Review comment:
       Too much `xxxAvailable` parameter. How about merge them into a struct, maybe like `predicates`?

##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/MetadataViewer.java
##########
@@ -84,7 +84,7 @@
                             
                             ReplicaStatus status = ReplicaStatus.OK;
                             Backend be = infoService.getBackend(replica.getBackendId());
-                            if (be == null || !be.isAvailable() || replica.isBad()) {
+                            if (be == null || !be.isAlive() || replica.isBad()) {

Review comment:
       After your modification, Even if BE is decommission, the replica status is OK.
   But when I execute `admin show replica status` stmt, I want to see all `abnormal` status.
   
   So I think better to make this check strictly.

##########
File path: fe/fe-core/src/main/java/org/apache/doris/clone/BackendLoadStatistic.java
##########
@@ -175,7 +175,7 @@ public void init() throws LoadBalanceException {
             throw new LoadBalanceException("backend " + beId + " does not exist");
         }
 
-        isAvailable = be.isAvailable();
+        isAvailable = be.isLoadAvailable();

Review comment:
       In BackendLoadStatistic, the `isAvailable` is used to determine whether this BE can be the destination of clone task.
   I think if BE is decommission, it should not accept any new clone task.
   So maybe this should be `isAvailable = be.isLoadAvailable() && be.isScheduleAvailable()` ?




-- 
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] github-actions[bot] commented on pull request #7155: [Config] Support disable query and load for backend to make Doris more robust and set default value to 1 for max_query_retry_time

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7155:
URL: https://github.com/apache/incubator-doris/pull/7155#issuecomment-981391956


   PR approved by at least one committer and no changes requested.


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