check max_read_stale_time when setting variables

This commit is contained in:
dimstars
2023-05-29 10:41:24 +00:00
committed by ob-robot
parent 7588202b83
commit e3d38080aa
5 changed files with 36 additions and 8 deletions

View File

@ -8999,7 +8999,8 @@ int ObRootService::check_weak_read_version_refresh_interval(int64_t refresh_inte
LOG_WARN("get value failed", KR(ret), K(tenant_id), K(obj));
} else if (OB_FAIL(obj.get_int(session_max_stale_time))) {
LOG_WARN("get int failed", KR(ret), K(tenant_id), K(obj));
} else if (refresh_interval > session_max_stale_time) {
} else if (session_max_stale_time != share::ObSysVarFactory::INVALID_MAX_READ_STALE_TIME
&& refresh_interval > session_max_stale_time) {
valid = false;
LOG_USER_ERROR(OB_INVALID_ARGUMENT,
"weak_read_version_refresh_interval is larger than ob_max_read_stale_time");