[bugfix] range of _rebuild_replica_log_lag_threshold should not be +∞

This commit is contained in:
yyy-hust
2023-05-26 07:52:45 +00:00
committed by ob-robot
parent c572f3bf9e
commit 379dbe0109
3 changed files with 4 additions and 3 deletions

View File

@ -273,7 +273,6 @@ TEST_F(TestObSimpleLogClusterLogThrottling, test_throttling_basic)
ASSERT_EQ(0, throttle.stat_.total_throttling_task_cnt_);
ASSERT_EQ(10, throttle.stat_.total_skipped_task_cnt_);
ASSERT_EQ(10 * (log_size), throttle.stat_.total_skipped_size_);
ASSERT_EQ(10 * (log_size), throttle.appended_log_size_cur_round_);
int64_t cur_has_batched_size = log_io_worker->batch_io_task_mgr_.has_batched_size_;
// no io reduce during writing throttling
ASSERT_EQ(cur_has_batched_size, prev_has_batched_size);

View File

@ -98,9 +98,11 @@ int ObLSAdapter::replay(ObLogReplayTask *replay_task)
}
replay_task->replay_cost_ = ObTimeUtility::fast_current_time() - start_ts;
if (replay_task->replay_cost_ > MAX_SINGLE_REPLAY_WARNING_TIME_THRESOLD) {
const bool is_meta_t = is_meta_tenant(MTL_ID());
//meta tenant is in mini mode
if (replay_task->replay_cost_ > MAX_SINGLE_REPLAY_ERROR_TIME_THRESOLD
&& !get_replay_is_writing_throttling()
&& lib::is_mini_mode()) {
&& (!lib::is_mini_mode() || is_meta_t)) {
CLOG_LOG_RET(ERROR, OB_ERR_TOO_MUCH_TIME, "single replay task cost too much time. replay may be delayed", KPC(replay_task));
} else {
CLOG_LOG_RET(WARN, OB_ERR_TOO_MUCH_TIME, "single replay task cost too much time", KPC(replay_task));

View File

@ -1482,6 +1482,6 @@ DEF_BOOL(_optimizer_group_by_placement, OB_TENANT_PARAMETER, "True",
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));
DEF_CAP(_rebuild_replica_log_lag_threshold, OB_TENANT_PARAMETER, "0M", "[0M,+∞]",
DEF_CAP(_rebuild_replica_log_lag_threshold, OB_TENANT_PARAMETER, "0M", "[0M,)",
"size of clog files that a replica lag behind leader to trigger rebuild, 0 means never trigger rebuild on purpose. Range: [0, +∞)",
ObParameterAttr(Section::TRANS, Source::DEFAULT, EditLevel::DYNAMIC_EFFECTIVE));