Adjust the compatibility for ob_max_read_stale_time for user

This commit is contained in:
obdev
2023-06-08 07:53:44 +00:00
committed by ob-robot
parent f4b390d643
commit 3eee8c1e84
2 changed files with 6 additions and 3 deletions

View File

@ -1202,7 +1202,8 @@ int ObSqlTransControl::check_ls_readable(const uint64_t tenant_id,
|| max_stale_time_us <= -2) {
ret = OB_INVALID_ARGUMENT;
LOG_WARN("invalid argument", K(ls_id), K(addr), K(max_stale_time_us));
} else if (max_stale_time_us < 0) {
} else if (max_stale_time_us < 0
|| GET_MIN_CLUSTER_VERSION() < CLUSTER_VERSION_4_2_0_0) {
// no need check
can_read = true;
} else if (observer::ObServer::get_instance().get_self() == addr) {