[feature](create-table) support setting replication num for creating table opertaion globally (#21848)

Add a new FE config `force_olap_table_replication_num`.
If this config is larger than 0, when doing creating table operation, the replication num of table will
forcibly be this value.
Default is 0, which make no effect.
This config will only effect the creating olap table operation, other operation such as `add partition`,
`modify table properties` will not be effect.

The motivation of this config is that the most regression test cases are creating table will single replica,
this will be the regression test running well in p0, p1 pipeline.
But we also need to run these cases in multi backend Doris cluster, so we need test cases will multi replicas.
But it is hard to modify each test cases. So I add this config, so that we can simply set it to create all tables with
specified replication number.
This commit is contained in:
Mingyu Chen
2023-07-21 19:36:04 +08:00
committed by GitHub
parent e489b60ea3
commit 85cc044aaa
3 changed files with 72 additions and 0 deletions

View File

@ -2049,4 +2049,15 @@ public class Config extends ConfigBase {
@ConfField
public static long statistics_sql_mem_limit_in_bytes = 2L * 1024 * 1024 * 1024;
@ConfField(mutable = true, masterOnly = true, description = {
"用于强制设定内表的副本数,如果改参数大于零,则用户在建表时指定的副本数将被忽略,而使用本参数设置的值。"
+ "同时,建表语句中指定的副本标签等参数会被忽略。该参数不影响包括创建分区、修改表属性的操作。该参数建议仅用于测试环境",
"Used to force the number of replicas of the internal table. If the config is greater than zero, "
+ "the number of replicas specified by the user when creating the table will be ignored, "
+ "and the value set by this parameter will be used. At the same time, the replica tags "
+ "and other parameters specified in the create table statement will be ignored. "
+ "This config does not effect the operations including creating partitions "
+ "and modifying table properties. "
+ "This config is recommended to be used only in the test environment"})
public static int force_olap_table_replication_num = 0;
}