[improve](alter-job) Add a config for forbiding doing alter job (#23294)
This commit is contained in:
@ -2111,4 +2111,7 @@ public class Config extends ConfigBase {
|
||||
"是否用 mysql 的 bigint 类型来返回 Doris 的 largeint 类型",
|
||||
"Whether to use mysql's bigint type to return Doris's largeint type"})
|
||||
public static boolean use_mysql_bigint_for_largeint = false;
|
||||
|
||||
@ConfField
|
||||
public static boolean forbid_running_alter_job = false;
|
||||
}
|
||||
|
||||
@ -1602,6 +1602,9 @@ public class SchemaChangeHandler extends AlterHandler {
|
||||
}
|
||||
|
||||
private void runAlterJobV2() {
|
||||
if (Config.forbid_running_alter_job) {
|
||||
return;
|
||||
}
|
||||
runnableSchemaChangeJobV2.values().forEach(alterJobsV2 -> {
|
||||
if (!alterJobsV2.isDone() && !activeSchemaChangeJobsV2.containsKey(alterJobsV2.getJobId())
|
||||
&& activeSchemaChangeJobsV2.size() < MAX_ACTIVE_SCHEMA_CHANGE_JOB_V2_SIZE) {
|
||||
|
||||
Reference in New Issue
Block a user