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: [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]