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/12/03 04:32:45 UTC

[GitHub] [incubator-doris] tinkerrrr opened a new pull request #7282: add min_table_replication_num config

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


   ## Proposed changes
   
   Add min_table_replication_num config to avoid creating single replication table, by setting it to a number bigger than 1
   
   ## 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)
   - [x] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [x] Documentation Update (if none of the other choices apply)
   - [ ] Code refactor (Modify the code structure, format the code, etc...)
   - [ ] 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
   - [x] 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] tinkerrrr commented on pull request #7282: add min_table_replication_num config

Posted by GitBox <gi...@apache.org>.
tinkerrrr commented on pull request #7282:
URL: https://github.com/apache/incubator-doris/pull/7282#issuecomment-987604252


   @morningman @caiconghui I will close this PR since this have been resolved in https://github.com/apache/incubator-doris/pull/7087


-- 
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] tinkerrrr commented on a change in pull request #7282: add min_table_replication_num config

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



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java
##########
@@ -3731,6 +3731,10 @@ private void createOlapTable(Database db, CreateTableStmt stmt) throws UserExcep
         if (replicaAlloc.isNotSet()) {
             replicaAlloc = ReplicaAllocation.DEFAULT_ALLOCATION;
         }
+        if (replicaAlloc.getTotalReplicaNum() < Config.min_table_replication_num) {

Review comment:
       done




-- 
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] tinkerrrr commented on a change in pull request #7282: add min_table_replication_num config

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



##########
File path: fe/fe-core/src/main/java/org/apache/doris/common/Config.java
##########
@@ -1544,4 +1544,7 @@
      */
     @ConfField(mutable = true, masterOnly = true)
     public static boolean disable_tablet_scheduler = false;
+
+    @ConfField(mutable = true, masterOnly = true)
+    public static short min_table_replication_num = 1;

Review comment:
       done




-- 
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] tinkerrrr commented on a change in pull request #7282: add min_table_replication_num config

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



##########
File path: docs/en/administrator-guide/config/fe_config.md
##########
@@ -138,6 +138,12 @@ Default:1G
 
 Used to set the initial flow window size of the GRPC client channel, and also used to max message size.  When the result set is large, you may need to increase this value.
 
+### min_table_replication_num

Review comment:
       Oh, I didn't notice that they are indeed the same thing...




-- 
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] tinkerrrr closed pull request #7282: add min_table_replication_num config

Posted by GitBox <gi...@apache.org>.
tinkerrrr closed pull request #7282:
URL: https://github.com/apache/incubator-doris/pull/7282


   


-- 
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 #7282: add min_table_replication_num config

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



##########
File path: docs/en/administrator-guide/config/fe_config.md
##########
@@ -138,6 +138,12 @@ Default:1G
 
 Used to set the initial flow window size of the GRPC client channel, and also used to max message size.  When the result set is large, you may need to increase this value.
 
+### min_table_replication_num

Review comment:
       what's the difference between min_table_replication_num and min_replication_num_per_tablet? it seems same?




-- 
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 #7282: add min_table_replication_num config

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



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java
##########
@@ -3731,6 +3731,10 @@ private void createOlapTable(Database db, CreateTableStmt stmt) throws UserExcep
         if (replicaAlloc.isNotSet()) {
             replicaAlloc = ReplicaAllocation.DEFAULT_ALLOCATION;
         }
+        if (replicaAlloc.getTotalReplicaNum() < Config.min_table_replication_num) {

Review comment:
       This should be done in `PropertyAnalyzer.analyzeReplicaAllocation()`.
   Because there are many other place to set or modify the replication number.

##########
File path: fe/fe-core/src/main/java/org/apache/doris/common/Config.java
##########
@@ -1544,4 +1544,7 @@
      */
     @ConfField(mutable = true, masterOnly = true)
     public static boolean disable_tablet_scheduler = false;
+
+    @ConfField(mutable = true, masterOnly = true)
+    public static short min_table_replication_num = 1;

Review comment:
       And comment to explain this config




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