[CP] add _ob_wait_interval_after_truncate conf for truncate

This commit is contained in:
obdev
2023-05-23 02:41:36 +00:00
committed by ob-robot
parent c7d7f34b18
commit e9ee090ba4
3 changed files with 5 additions and 1 deletions

View File

@ -1479,3 +1479,6 @@ DEF_BOOL(_xsolapi_generate_with_clause, OB_TENANT_PARAMETER, "True",
DEF_BOOL(_optimizer_group_by_placement, OB_TENANT_PARAMETER, "True",
"enable group by placement transform rule",
ObParameterAttr(Section::TENANT, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
DEF_TIME(_wait_interval_after_truncate, OB_CLUSTER_PARAMETER, "30s", "[0s,)",
"time interval for waiting other servers to refresh schema after truncate",
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));

View File

@ -2147,7 +2147,7 @@ int ObTruncateTableExecutor::execute(ObExecContext &ctx, ObTruncateTableStmt &st
&& consensus_schema_version >= res.task_id_) {
break;
} else if (refreshed_schema_version >= res.task_id_
&& ObTimeUtility::current_time() - step_time >= 10 * 1000 * 1000) { //10s
&& ObTimeUtility::current_time() - step_time >= GCONF._wait_interval_after_truncate) {
break;
} else {
ob_usleep(10 * 1000);

View File

@ -352,6 +352,7 @@ _temporary_file_io_area_size
_trace_control_info
_tx_result_retention
_upgrade_stage
_wait_interval_after_truncate
_with_subquery
_xa_gc_interval
_xa_gc_timeout