add config _enable_choose_migration_source_policy and choose_migration_source_policy in master code
This commit is contained in:
@ -1149,5 +1149,12 @@ bool ObConfigTableStoreFormatChecker::check(const ObConfigItem &t) const {
|
|||||||
0 == tmp_str.case_compare("COMPOUND");
|
0 == tmp_str.case_compare("COMPOUND");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ObConfigMigrationChooseSourceChecker::check(const ObConfigItem &t) const
|
||||||
|
{
|
||||||
|
ObString v_str(t.str());
|
||||||
|
return 0 == v_str.case_compare("idc")
|
||||||
|
|| 0 == v_str.case_compare("region");
|
||||||
|
}
|
||||||
|
|
||||||
} // end of namepace common
|
} // end of namepace common
|
||||||
} // end of namespace oceanbase
|
} // end of namespace oceanbase
|
||||||
|
|||||||
@ -731,6 +731,17 @@ private:
|
|||||||
DISALLOW_COPY_AND_ASSIGN(ObConfigTableStoreFormatChecker);
|
DISALLOW_COPY_AND_ASSIGN(ObConfigTableStoreFormatChecker);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ObConfigMigrationChooseSourceChecker
|
||||||
|
: public ObConfigChecker
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ObConfigMigrationChooseSourceChecker() {}
|
||||||
|
virtual ~ObConfigMigrationChooseSourceChecker() {}
|
||||||
|
bool check(const ObConfigItem &t) const;
|
||||||
|
private:
|
||||||
|
DISALLOW_COPY_AND_ASSIGN(ObConfigMigrationChooseSourceChecker);
|
||||||
|
};
|
||||||
|
|
||||||
typedef __ObConfigContainer<ObConfigStringKey,
|
typedef __ObConfigContainer<ObConfigStringKey,
|
||||||
ObConfigItem, OB_MAX_CONFIG_NUMBER> ObConfigContainer;
|
ObConfigItem, OB_MAX_CONFIG_NUMBER> ObConfigContainer;
|
||||||
} // namespace common
|
} // namespace common
|
||||||
|
|||||||
@ -1871,3 +1871,12 @@ DEF_TIME(_faststack_min_interval, OB_CLUSTER_PARAMETER, "30m", "[1s,)",
|
|||||||
"Minimum interval for OBServer to automatically collect the obstack. "
|
"Minimum interval for OBServer to automatically collect the obstack. "
|
||||||
"Default: 30min. Range: [1s,+∞)",
|
"Default: 30min. Range: [1s,+∞)",
|
||||||
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
|
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
|
||||||
|
DEF_STR_WITH_CHECKER(choose_migration_source_policy, OB_TENANT_PARAMETER, "idc",
|
||||||
|
common::ObConfigMigrationChooseSourceChecker,
|
||||||
|
"the policy of choose source in migration and add replica. 'idc' means firstly choose follower replica of the same idc as source, "
|
||||||
|
"'region' means firstly choose follower replica of the same region as source",
|
||||||
|
ObParameterAttr(Section::TENANT, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
|
||||||
|
DEF_BOOL(_enable_choose_migration_source_policy, OB_TENANT_PARAMETER, "True",
|
||||||
|
"Control whether to use chose_migration_source_policy. "
|
||||||
|
"If the value of configure is false, it will not use chose_migration_source_policy and choose replica with the largest checkpoint scn as the source.",
|
||||||
|
ObParameterAttr(Section::TENANT, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
|
||||||
@ -38,6 +38,7 @@ bf_cache_miss_count_threshold
|
|||||||
bf_cache_priority
|
bf_cache_priority
|
||||||
builtin_db_data_verify_cycle
|
builtin_db_data_verify_cycle
|
||||||
cache_wash_threshold
|
cache_wash_threshold
|
||||||
|
choose_migration_source_policy
|
||||||
clog_sync_time_warn_threshold
|
clog_sync_time_warn_threshold
|
||||||
cluster
|
cluster
|
||||||
cluster_id
|
cluster_id
|
||||||
@ -277,6 +278,7 @@ _enable_adaptive_merge_schedule
|
|||||||
_enable_backtrace_function
|
_enable_backtrace_function
|
||||||
_enable_balance_kill_transaction
|
_enable_balance_kill_transaction
|
||||||
_enable_block_file_punch_hole
|
_enable_block_file_punch_hole
|
||||||
|
_enable_choose_migration_source_policy
|
||||||
_enable_column_store
|
_enable_column_store
|
||||||
_enable_compaction_diagnose
|
_enable_compaction_diagnose
|
||||||
_enable_convert_real_to_decimal
|
_enable_convert_real_to_decimal
|
||||||
|
|||||||
Reference in New Issue
Block a user