morningman commented on a change in pull request #7025:
URL: https://github.com/apache/incubator-doris/pull/7025#discussion_r746224515
##########
File path: fe/fe-core/src/main/java/org/apache/doris/common/Config.java
##########
@@ -1384,6 +1384,12 @@
@ConfField(mutable = true, masterOnly = true)
public static long default_db_data_quota_bytes = 1024L * 1024 * 1024 *
1024 * 1024L; // 1PB
+ /**
+ * Used to set default db replica quota num.
+ */
+ @ConfField(mutable = true, masterOnly = true)
+ public static long default_db_replica_quota_size = 1024 * 1024 * 1024;
Review comment:
Add this new config in
```
docs/zh-CN/administrator-guide/config/fe_config.md
docs/en/administrator-guide/config/fe_config.md
```
##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java
##########
@@ -3254,6 +3254,16 @@ public void addPartition(Database db, String tableName,
AddPartitionClause addPa
DataProperty dataProperty =
singlePartitionDesc.getPartitionDataProperty();
Preconditions.checkNotNull(dataProperty);
+ // check replica quota if this operation done
Review comment:
The check here, and check at line L3851-3858 and L3895-3907 can be done
in `Catalog.createPartitionWithIndices()`, before `createTablets()`
https://github.com/apache/incubator-doris/blob/4c6cbdf4635e48a3465bdfd7302cd3a0faabba42/fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java#L3527-L3537
##########
File path: fe/fe-core/src/main/java/org/apache/doris/catalog/Catalog.java
##########
@@ -6691,6 +6726,19 @@ public void truncateTable(TruncateTableStmt
truncateTableStmt) throws DdlExcepti
// tabletIdSet to save all newly created tablet ids.
Set<Long> tabletIdSet = Sets.newHashSet();
try {
+ // check replica quota if this operation done
+ long totalReplicaNum = 0;
Review comment:
For `truncate` operation. I don't think we should check replica quota.
Otherwise user may not be able to truncate table.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]