[FIX] modify defensive code and log level of throttle unit
This commit is contained in:
@ -77,8 +77,8 @@ void FakeAllocatorForTxShare::adaptive_update_limit(const int64_t tenant_id,
|
||||
|
||||
int64_t cur_ts = ObClockGenerator::getClock();
|
||||
int64_t old_ts = last_update_limit_ts;
|
||||
if (OB_UNLIKELY(old_ts - cur_ts > UPDATE_LIMIT_INTERVAL)) {
|
||||
SHARE_LOG_RET(ERROR, OB_ERR_UNEXPECTED, "invalid timestamp", K(cur_ts), K(old_ts));
|
||||
if (OB_UNLIKELY(old_ts - cur_ts > (1LL * 1000LL * 1000LL /* 1 second */))) {
|
||||
SHARE_LOG_RET(WARN, OB_ERR_UNEXPECTED, "invalid timestamp", K(cur_ts), K(old_ts));
|
||||
} else if ((cur_ts - old_ts > UPDATE_LIMIT_INTERVAL) && ATOMIC_BCAS(&last_update_limit_ts, old_ts, cur_ts)) {
|
||||
int64_t remain_memory = lib::get_tenant_memory_remain(tenant_id);
|
||||
int64_t usable_remain_memory = remain_memory / 100 * USABLE_REMAIN_MEMORY_PERCETAGE;
|
||||
|
Reference in New Issue
Block a user