fix 1002_restore_read_tablet_meta_failed case timeout issue
This commit is contained in:
parent
8c31cdbdb7
commit
042d3bc1ed
@ -926,6 +926,11 @@ ERRSIM_DEF_TIME(trigger_auto_backup_delete_interval, OB_CLUSTER_PARAMETER, "1h",
|
||||
"The default value is 1h. Range: [1s,)",
|
||||
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
|
||||
|
||||
ERRSIM_DEF_INT(errsim_max_restore_retry_count, OB_CLUSTER_PARAMETER, "0", "[0,)",
|
||||
"max restore retry count in errsim mode"
|
||||
"Range: [0,) in integer",
|
||||
ObParameterAttr(Section::OBSERVER, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));
|
||||
|
||||
#ifdef TRANS_MODULE_TEST
|
||||
DEF_INT(module_test_trx_memory_errsim_percentage, OB_CLUSTER_PARAMETER, "0", "[0, 100]",
|
||||
"the percentage of memory errsim. Rang:[0,100]",
|
||||
|
@ -2351,6 +2351,17 @@ ObLSRestoreResultMgr::ObLSRestoreResultMgr()
|
||||
{
|
||||
}
|
||||
|
||||
bool ObLSRestoreResultMgr::can_retry() const
|
||||
{
|
||||
int64_t max_retry_cnt = OB_MAX_RESTORE_RETRY_TIMES;
|
||||
#ifdef ERRSIM
|
||||
if (0 != GCONF.errsim_max_restore_retry_count) {
|
||||
max_retry_cnt = GCONF.errsim_max_restore_retry_count;
|
||||
}
|
||||
#endif
|
||||
return retry_cnt_ < max_retry_cnt && can_retrieable_err_(result_);
|
||||
}
|
||||
|
||||
bool ObLSRestoreResultMgr::is_met_retry_time_interval()
|
||||
{
|
||||
lib::ObMutexGuard guard(mtx_);
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
~ObLSRestoreResultMgr() {}
|
||||
int get_result() const { return result_; }
|
||||
const share::ObTaskId &get_trace_id() const { return trace_id_; }
|
||||
bool can_retry() const { return retry_cnt_ < OB_MAX_RESTORE_RETRY_TIMES && can_retrieable_err_(result_); }
|
||||
bool can_retry() const;
|
||||
bool is_met_retry_time_interval();
|
||||
void set_result(const int result, const share::ObTaskId &trace_id, const RestoreFailedType &failed_type);
|
||||
int get_comment_str(Comment &comment) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user