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/04/09 04:47:18 UTC

[GitHub] [incubator-doris] caiconghui opened a new pull request #3283: Support setting replica quota in db level

caiconghui opened a new pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283
 
 
   This PR is to limit the replica usage, admin need to know the replica usage for every db and table, be able to set replica quota for every db.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406242674
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/persist/DatabaseInfo.java
 ##########
 @@ -107,4 +115,12 @@ public void setDbState(DbState dbState) {
         this.dbState = dbState;
     }
 
+    public QuotaType getQuotaType() {
+        return quotaType;
+    }
+
+    public void setQuotaType(QuotaType quotaType) {
 
 Review comment:
   remove the unused `set` method.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406236190
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/catalog/Catalog.java
 ##########
 @@ -2781,16 +2782,25 @@ public void alterDatabaseQuota(AlterDatabaseQuotaStmt stmt) throws DdlException
             ErrorReport.reportDdlException(ErrorCode.ERR_BAD_DB_ERROR, dbName);
         }
 
-        db.setDataQuotaWithLock(stmt.getQuota());
-
-        DatabaseInfo dbInfo = new DatabaseInfo(dbName, "", db.getDataQuota());
+        QuotaType quotaType = stmt.getQuotaType();
+        if (quotaType == QuotaType.DATA) {
+            db.setDataQuotaWithLock(stmt.getQuota());
+        } else if (quotaType == QuotaType.REPLICA) {
+            db.setReplicaQuotaWithLock(stmt.getQuota());
+        }
+        long quota = (quotaType == QuotaType.DATA ? db.getDataQuota() : db.getReplicaQuota());
 
 Review comment:
   ```suggestion
           long quota = stmt.getQuota();
   ```

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


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] kangkaisen commented on a change in pull request #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
kangkaisen commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406664320
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/catalog/Database.java
 ##########
 @@ -450,6 +488,12 @@ public void readFields(DataInput in) throws IOException {
                 name2Function.put(name, builder.build());
             }
         }
+
+        if (Catalog.getCurrentCatalogJournalVersion() >= FeMetaVersion.VERSION_80) {
 
 Review comment:
   Why not enlarge the meta version?

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406238734
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/catalog/Database.java
 ##########
 @@ -232,7 +250,34 @@ public long getDataQuotaLeftWithLock() {
         }
     }
 
-    public void checkQuota() throws DdlException {
+
+    public long getReplicaQuotaLeftWithLock() {
+        long usedReplicaQuota = 0;
+        readLock();
+        try {
+            for (Table table : this.idToTable.values()) {
+                if (table.getType() != TableType.OLAP) {
+                    continue;
+                }
+
+                OlapTable olapTable = (OlapTable) table;
 
 Review comment:
   Why not just using `table.getReplicaCount()`?

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406241868
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/common/proc/TablesProcDir.java
 ##########
 @@ -43,7 +43,7 @@
 public class TablesProcDir implements ProcDirInterface {
     public static final ImmutableList<String> TITLE_NAMES = new ImmutableList.Builder<String>()
             .add("TableId").add("TableName").add("IndexNum").add("PartitionColumnName")
-            .add("PartitionNum").add("State").add("Type").add("LastConsistencyCheckTime")
+            .add("PartitionNum").add("ReplicaCount").add("State").add("Type").add("LastConsistencyCheckTime")
 
 Review comment:
   Add the new column at the end of columns, for compatibility

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r407063056
 
 

 ##########
 File path: fe/src/main/cup/sql_parser.cup
 ##########
 @@ -714,9 +714,9 @@ alter_stmt ::=
     {:
         RESULT = new AlterDatabaseQuotaStmt(dbName, QuotaType.DATA, quota_quantity);
     :}
-    | KW_ALTER KW_DATABASE ident:dbName KW_SET KW_REPLICA KW_QUOTA quantity:quota_quantity
+    | KW_ALTER KW_DATABASE ident:dbName KW_SET KW_REPLICA KW_QUOTA INTEGER_LITERAL: number
 
 Review comment:
   ```suggestion
       | KW_ALTER KW_DATABASE ident:dbName KW_SET KW_REPLICA KW_QUOTA INTEGER_LITERAL:number
   ```

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
caiconghui commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406666254
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/catalog/Database.java
 ##########
 @@ -450,6 +488,12 @@ public void readFields(DataInput in) throws IOException {
                 name2Function.put(name, builder.build());
             }
         }
+
+        if (Catalog.getCurrentCatalogJournalVersion() >= FeMetaVersion.VERSION_80) {
 
 Review comment:
   ok, it is a bug

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
caiconghui commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406666386
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/common/FeConstants.java
 ##########
 @@ -31,6 +31,7 @@
     public static int shortkey_max_column_count = 3;
     public static int shortkey_maxsize_bytes = 36;
     public static long default_db_data_quota_bytes = 1024 * 1024 * 1024 * 1024L; // 1TB
+    public static long default_db_replica_quota_size = 1000000;
 
 Review comment:
   OK. I will change it to original default value

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406237031
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/catalog/Catalog.java
 ##########
 @@ -2835,7 +2845,7 @@ public void renameDatabase(AlterDatabaseRename stmt) throws DdlException {
             fullNameToDb.remove(fullDbName);
             fullNameToDb.put(newFullDbName, db);
 
-            DatabaseInfo dbInfo = new DatabaseInfo(fullDbName, newFullDbName, -1L);
+            DatabaseInfo dbInfo = new DatabaseInfo(fullDbName, newFullDbName, -1L, QuotaType.DATA);
 
 Review comment:
   How about change `QuotaType.DATA` to `null`? For better understanding?

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406240287
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/catalog/Database.java
 ##########
 @@ -450,6 +513,10 @@ public void readFields(DataInput in) throws IOException {
                 name2Function.put(name, builder.build());
             }
         }
+
+        if (Catalog.getCurrentCatalogJournalVersion() >= FeMetaVersion.VERSION_80) {
+            replicaQuotaSize = in.readLong();
+        }
 
 Review comment:
   ```suggestion
           } else {
               this.replicaQuotaSize = FeConstants.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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
caiconghui commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406597824
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/catalog/Catalog.java
 ##########
 @@ -2835,7 +2845,7 @@ public void renameDatabase(AlterDatabaseRename stmt) throws DdlException {
             fullNameToDb.remove(fullDbName);
             fullNameToDb.put(newFullDbName, db);
 
-            DatabaseInfo dbInfo = new DatabaseInfo(fullDbName, newFullDbName, -1L);
+            DatabaseInfo dbInfo = new DatabaseInfo(fullDbName, newFullDbName, -1L, QuotaType.DATA);
 
 Review comment:
   @morningman null may cause NullPointerException, so I use QuotaType.NONE instead of null

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
caiconghui commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406675498
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/common/FeConstants.java
 ##########
 @@ -31,6 +31,7 @@
     public static int shortkey_max_column_count = 3;
     public static int shortkey_maxsize_bytes = 36;
     public static long default_db_data_quota_bytes = 1024 * 1024 * 1024 * 1024L; // 1TB
+    public static long default_db_replica_quota_size = 1000000;
 
 Review comment:
   in my point of view, quota is a necessary limit for resource usage, the resource is limited, replica quota should like data quota, not set to be -1 @imay 

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


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] kangkaisen commented on a change in pull request #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
kangkaisen commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406660640
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/common/FeConstants.java
 ##########
 @@ -31,6 +31,7 @@
     public static int shortkey_max_column_count = 3;
     public static int shortkey_maxsize_bytes = 36;
     public static long default_db_data_quota_bytes = 1024 * 1024 * 1024 * 1024L; // 1TB
+    public static long default_db_replica_quota_size = 1000000;
 
 Review comment:
   The 1000000 is too small.  In meituan.com, the replica number for one database has exceeded 1000000. I think your initial value 1024 * 1024 * 1024 is 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] imay commented on issue #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
imay commented on issue #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#issuecomment-611326231
 
 
   @caiconghui 
   Better to create an issue to track this feature.
   And let others discuss about 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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406241231
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/common/proc/DbsProcDir.java
 ##########
 @@ -39,7 +39,7 @@
  */
 public class DbsProcDir implements ProcDirInterface {
     public static final ImmutableList<String> TITLE_NAMES = new ImmutableList.Builder<String>()
-            .add("DbId").add("DbName").add("TableNum").add("Quota")
+            .add("DbId").add("DbName").add("TableNum").add("DataQuota").add("ReplicaQuota")
 
 Review comment:
   Plz not modify the origin column name `Quota`, for compatibility.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406232615
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/ShowDataStmt.java
 ##########
 @@ -52,14 +52,16 @@
     private static final ShowResultSetMetaData SHOW_TABLE_DATA_META_DATA =
             ShowResultSetMetaData.builder()
                     .addColumn(new Column("TableName", ScalarType.createVarchar(20)))
-                    .addColumn(new Column("Size", ScalarType.createVarchar(30)))
+                    .addColumn(new Column("DataSize", ScalarType.createVarchar(30)))
 
 Review comment:
   Plz do not modify the origin column name "Size", it may cause some compatibility problem.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406238020
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/common/util/ParseUtil.java
 ##########
 @@ -71,4 +71,17 @@ public static long analyzeDataVolumn(String dataVolumnStr) throws UserException
         return dataVolumn;
     }
 
+    public static long analyzeReplicaVolumn(String replicaVolumnStr) throws AnalysisException {
+        long replicaVolumn = 0;
+        try {
+            replicaVolumn = Long.parseLong(replicaVolumnStr);
+        } catch (NumberFormatException nfe) {
+            throw new AnalysisException("invalid data volumn:" + replicaVolumnStr);
+        }
+        if (replicaVolumn < 0L) {
 
 Review comment:
   ```suggestion
           if (replicaVolumn <= 0L) {
   ```

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406231699
 
 

 ##########
 File path: fe/src/main/cup/sql_parser.cup
 ##########
 @@ -711,8 +712,13 @@ alter_stmt ::=
     :}
     | KW_ALTER KW_DATABASE ident:dbName KW_SET KW_DATA KW_QUOTA quantity:quota_quantity
     {:
-        RESULT = new AlterDatabaseQuotaStmt(dbName, quota_quantity);
+        RESULT = new AlterDatabaseQuotaStmt(dbName, QuotaType.DATA, quota_quantity);
     :}
+    | KW_ALTER KW_DATABASE ident:dbName KW_SET KW_REPLICA KW_QUOTA quantity:quota_quantity
 
 Review comment:
   ```suggestion
       | KW_ALTER KW_DATABASE ident:dbName KW_SET KW_REPLICA KW_QUOTA INTEGER_LITERAL: number
   ```
   
   quantity is for quota like 1KB, 1MB, 1GB

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
morningman merged pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283
 
 
   

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


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] imay commented on a change in pull request #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
imay commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406661924
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/common/FeConstants.java
 ##########
 @@ -31,6 +31,7 @@
     public static int shortkey_max_column_count = 3;
     public static int shortkey_maxsize_bytes = 36;
     public static long default_db_data_quota_bytes = 1024 * 1024 * 1024 * 1024L; // 1TB
+    public static long default_db_replica_quota_size = 1000000;
 
 Review comment:
   Why not set -1 as default value, which means no limit?
   Otherwise I'm afraid some cluster can't create table after cluster upgrade.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
caiconghui commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406670610
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/common/FeConstants.java
 ##########
 @@ -31,6 +31,7 @@
     public static int shortkey_max_column_count = 3;
     public static int shortkey_maxsize_bytes = 36;
     public static long default_db_data_quota_bytes = 1024 * 1024 * 1024 * 1024L; // 1TB
+    public static long default_db_replica_quota_size = 1000000;
 
 Review comment:
   @imay 1024 * 1024 * 1024 is a large value and enough, if one table has 100000 tablets , about 10000 tables can exits in on db?  

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 issue #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
caiconghui commented on issue #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#issuecomment-611328049
 
 
   @imay OK for #3285 

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


With regards,
Apache Git Services

---------------------------------------------------------------------
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 #3283: Support setting replica quota in db level

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #3283: Support setting replica quota in db level
URL: https://github.com/apache/incubator-doris/pull/3283#discussion_r406228470
 
 

 ##########
 File path: docs/documentation/cn/sql-reference/sql-statements/Data Definition/ALTER DATABASE.md
 ##########
 @@ -27,6 +27,9 @@ under the License.
         2) 重命名数据库
             ALTER DATABASE db_name RENAME new_db_name;
             
+        3) 设置数据库的副本数量配额
 
 Review comment:
   Plz indicate the default value of replica quota and data quota in the following `说明` section.

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


With regards,
Apache Git Services

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