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 2020/09/07 07:11:19 UTC

[GitHub] [incubator-doris] zhaojintaozhao opened a new pull request #4550: Doris can set default configuration of database data quota and replica quota #4505#

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


   Doris can  set default configuration of database data quota and replica quota #4505#
   ## Proposed changes
   When Doris create a  database, the database of data quota and replica quota is initialized by configuration(Config.default_db_data_quota_bytes and Config.default_db_replica_quota_bytes). In other words, I convert FeConstants.default_db_data_quota_bytes to Config.default_db_data_quota_bytes and convert FeConstants.default_db_replica_quota_size to Config.default_db_replica_quota_bytes. Config.default_db_data_quota_bytes and Config.default_db_replica_quota_bytes can be change in configuration file.
   
   ## 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...)
   
   ## 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 create an issue on (Fix #4540 ), and have 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 this change need a document change, I have updated the document
   - [] Any dependent changes have been merged
   
   ## Further comments
   


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


[GitHub] [incubator-doris] morningman merged pull request #4550: 【Feature】Doris can set default configuration of database data quota and replica quota #4540#

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


   


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


[GitHub] [incubator-doris] zhaojintaozhao commented on a change in pull request #4550: 【Feature】Doris can set default configuration of database data quota and replica quota #4540#

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



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java
##########
@@ -483,7 +483,7 @@ public void readFields(DataInput in) throws IOException {
         if (Catalog.getCurrentCatalogJournalVersion() >= FeMetaVersion.VERSION_81) {
             replicaQuotaSize = in.readLong();
         } else {
-            replicaQuotaSize = FeConstants.default_db_replica_quota_size;
+            replicaQuotaSize = Config.default_db_replica_quota_bytes;

Review comment:
       Hi morningman:
   You are right, I restore the modification of default_db_replica_quota_size.




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


[GitHub] [incubator-doris] zhaojintaozhao commented on a change in pull request #4550: 【Feature】Doris can set default configuration of database data quota and replica quota #4540#

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



##########
File path: fe/fe-core/src/main/java/org/apache/doris/common/Config.java
##########
@@ -1250,4 +1250,16 @@
      */
     @ConfField(mutable = true, masterOnly = true)
     public static boolean enable_batch_delete_by_default = false;
+
+    /**
+     * Used to set default db data quota bytes.
+     */
+    @ConfField(mutable = true, masterOnly = false)
+    public static long default_db_data_quota_bytes = 1024 * 1024 * 1024 * 1024L; // 1TB

Review comment:
       Yes, that's right. I change "masterOnly" to true




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


[GitHub] [incubator-doris] morningman commented on a change in pull request #4550: 【Feature】Doris can set default configuration of database data quota and replica quota #4540#

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



##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Database.java
##########
@@ -483,7 +483,7 @@ public void readFields(DataInput in) throws IOException {
         if (Catalog.getCurrentCatalogJournalVersion() >= FeMetaVersion.VERSION_81) {
             replicaQuotaSize = in.readLong();
         } else {
-            replicaQuotaSize = FeConstants.default_db_replica_quota_size;
+            replicaQuotaSize = Config.default_db_replica_quota_bytes;

Review comment:
       If change this to Config, different FE may has different configuration. So this will result in inconsistency of meta data.
   
   This is just a default value filled in for compatibility with old data. I suggest to leave it as `FeConstants.default_db_replica_quota_size`

##########
File path: fe/fe-core/src/main/java/org/apache/doris/common/Config.java
##########
@@ -1250,4 +1250,16 @@
      */
     @ConfField(mutable = true, masterOnly = true)
     public static boolean enable_batch_delete_by_default = false;
+
+    /**
+     * Used to set default db data quota bytes.
+     */
+    @ConfField(mutable = true, masterOnly = false)
+    public static long default_db_data_quota_bytes = 1024 * 1024 * 1024 * 1024L; // 1TB
+
+    /**
+     * Used to set default db replica quota bytes.
+     */
+    @ConfField(mutable = true, masterOnly = false)
+    public static long default_db_replica_quota_bytes = 1024 * 1024 * 1024;

Review comment:
       The unit is wrong. This is not a "byte size", but a "number of" replicas.

##########
File path: fe/fe-core/src/main/java/org/apache/doris/common/Config.java
##########
@@ -1250,4 +1250,16 @@
      */
     @ConfField(mutable = true, masterOnly = true)
     public static boolean enable_batch_delete_by_default = false;
+
+    /**
+     * Used to set default db data quota bytes.
+     */
+    @ConfField(mutable = true, masterOnly = false)
+    public static long default_db_data_quota_bytes = 1024 * 1024 * 1024 * 1024L; // 1TB

Review comment:
       Both config should be `masterOnly = true`




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


[GitHub] [incubator-doris] zhaojintaozhao commented on a change in pull request #4550: 【Feature】Doris can set default configuration of database data quota and replica quota #4540#

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



##########
File path: fe/fe-core/src/main/java/org/apache/doris/common/Config.java
##########
@@ -1250,4 +1250,16 @@
      */
     @ConfField(mutable = true, masterOnly = true)
     public static boolean enable_batch_delete_by_default = false;
+
+    /**
+     * Used to set default db data quota bytes.
+     */
+    @ConfField(mutable = true, masterOnly = false)
+    public static long default_db_data_quota_bytes = 1024 * 1024 * 1024 * 1024L; // 1TB

Review comment:
       OK, I change the "masterOnly" property of default_db_data_quota_bytes to true




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


[GitHub] [incubator-doris] morningman merged pull request #4550: 【Feature】Doris can set default configuration of database data quota and replica quota #4540#

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


   


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


[GitHub] [incubator-doris] morningman merged pull request #4550: 【Feature】Doris can set default configuration of database data quota and replica quota #4540#

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






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


[GitHub] [incubator-doris] zhaojintaozhao commented on a change in pull request #4550: 【Feature】Doris can set default configuration of database data quota and replica quota #4540#

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



##########
File path: fe/fe-core/src/main/java/org/apache/doris/common/Config.java
##########
@@ -1250,4 +1250,16 @@
      */
     @ConfField(mutable = true, masterOnly = true)
     public static boolean enable_batch_delete_by_default = false;
+
+    /**
+     * Used to set default db data quota bytes.
+     */
+    @ConfField(mutable = true, masterOnly = false)
+    public static long default_db_data_quota_bytes = 1024 * 1024 * 1024 * 1024L; // 1TB
+
+    /**
+     * Used to set default db replica quota bytes.
+     */
+    @ConfField(mutable = true, masterOnly = false)
+    public static long default_db_replica_quota_bytes = 1024 * 1024 * 1024;

Review comment:
       I restore the modification of default_db_replica_quota_size.




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