From a623dd4b205f0c9df106ebd9dd143e2d2f992bc4 Mon Sep 17 00:00:00 2001 From: zxlzxlzxlzxlzxl Date: Mon, 14 Aug 2023 11:18:38 +0000 Subject: [PATCH] [CdcService] check lagged follower every time reach max lsn --- src/logservice/cdcservice/ob_cdc_fetcher.cpp | 7 ++----- src/logservice/libobcdc/src/ob_log_config.h | 2 +- src/logservice/logfetcher/ob_log_config.h | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/logservice/cdcservice/ob_cdc_fetcher.cpp b/src/logservice/cdcservice/ob_cdc_fetcher.cpp index e3c290f95..833005eae 100644 --- a/src/logservice/cdcservice/ob_cdc_fetcher.cpp +++ b/src/logservice/cdcservice/ob_cdc_fetcher.cpp @@ -755,7 +755,6 @@ void ObCdcFetcher::handle_when_reach_max_lsn_in_palf_(const ObLSID &ls_id, ObCdcLSFetchLogResp &resp) { int ret = OB_SUCCESS; - bool is_ls_fall_behind = frt.is_ls_fall_behind(); // Because we cannot determine whether this LS is a backward standby or a normal LS, // we can only check the LS. @@ -764,10 +763,8 @@ void ObCdcFetcher::handle_when_reach_max_lsn_in_palf_(const ObLSID &ls_id, // 1. Reach max lsn but the progress is behind the upper limit // 2. No logs fetched in this round of RPC // 2. The overall progress is behind - if (fetched_log_count <= 0 && is_ls_fall_behind) { - if (OB_FAIL(check_lag_follower_(ls_id, palf_handle_guard, resp))) { - LOG_WARN("check_lag_follower_ fail", KR(ret), K(ls_id), K(frt)); - } + if (OB_FAIL(check_lag_follower_(ls_id, palf_handle_guard, resp))) { + LOG_WARN("check_lag_follower_ fail", KR(ret), K(ls_id), K(frt)); } } diff --git a/src/logservice/libobcdc/src/ob_log_config.h b/src/logservice/libobcdc/src/ob_log_config.h index 92963a946..25b85d62d 100644 --- a/src/logservice/libobcdc/src/ob_log_config.h +++ b/src/logservice/libobcdc/src/ob_log_config.h @@ -348,7 +348,7 @@ public: T_DEF_INT_INFT(blacklist_survival_time_sec, OB_CLUSTER_PARAMETER, 30, 1, "blacklist-server surival time in seconds"); // The maximum time the server can be blacklisted, in minutes - T_DEF_INT_INFT(blacklist_survival_time_upper_limit_min, OB_CLUSTER_PARAMETER, 4, 1, "blacklist-server survival time upper limit in minute"); + T_DEF_INT_INFT(blacklist_survival_time_upper_limit_min, OB_CLUSTER_PARAMETER, 1, 1, "blacklist-server survival time upper limit in minute"); // The server is blacklisted in the logstream, based on the time of the current server service logstream - to decide whether to penalize the survival time // When the service time is less than a certain interval, a doubling-live-time policy is adopted diff --git a/src/logservice/logfetcher/ob_log_config.h b/src/logservice/logfetcher/ob_log_config.h index a7a9cfd21..4656e3daa 100644 --- a/src/logservice/logfetcher/ob_log_config.h +++ b/src/logservice/logfetcher/ob_log_config.h @@ -181,7 +181,7 @@ public: T_DEF_INT_INFT(blacklist_survival_time_sec, OB_CLUSTER_PARAMETER, 30, 1, "blacklist-server surival time in seconds"); // The maximum time the server can be blacklisted, in minutes - T_DEF_INT_INFT(blacklist_survival_time_upper_limit_min, OB_CLUSTER_PARAMETER, 4, 1, "blacklist-server survival time upper limit in minute"); + T_DEF_INT_INFT(blacklist_survival_time_upper_limit_min, OB_CLUSTER_PARAMETER, 1, 1, "blacklist-server survival time upper limit in minute"); // The server is blacklisted in the logstream, based on the time of the current server service logstream - to decide whether to penalize the survival time // When the service time is less than a certain interval, a doubling-live-time policy is adopted