Do not report ERROR when sample rate equals 100

This commit is contained in:
ZenoWang
2024-02-06 14:49:31 +00:00
committed by ob-robot
parent 1f1d5c08ae
commit c8ef409bf3
3710 changed files with 486984 additions and 3083329 deletions

View File

@ -300,9 +300,7 @@ int ObTenantCompactionMemPool::init()
} else {
chunk_allocator_.set_tenant_id(MTL_ID());
piece_allocator_.set_tenant_id(MTL_ID());
max_block_num_ = MTL_IS_MINI_MODE()
? MINI_MODE_CHUNK_MEMORY_LIMIT / ObCompactionBufferChunk::DEFAULT_BLOCK_SIZE
: CHUNK_MEMORY_LIMIT / ObCompactionBufferChunk::DEFAULT_BLOCK_SIZE;
max_block_num_ = MAX_MEMORY_LIMIT / ObCompactionBufferChunk::DEFAULT_BLOCK_SIZE;
total_block_num_ = 0;
is_inited_ = true;
}
@ -493,8 +491,8 @@ int ObTenantCompactionMemPool::try_shrink()
{
int ret = OB_SUCCESS;
ObSpinLockGuard guard(chunk_lock_);
// not reserve mem in mini mode
if (!MTL_IS_MINI_MODE() && max_block_num_ > total_block_num_) {
if (max_block_num_ > total_block_num_) {
// do nothing
} else if (used_block_num_ <= total_block_num_ / 2) {
// Less than half of blocks were used, need shrink
@ -544,9 +542,7 @@ void ObTenantCompactionMemPool::MemPoolShrinkTask::runTimerTask()
bool ObTenantCompactionMemPool::acquire_reserve_mem()
{
bool bret = false;
if (!MTL_IS_MINI_MODE()) {
bret = ATOMIC_BCAS(&reserve_mode_signal_, 1, 0);
}
bret = ATOMIC_BCAS(&reserve_mode_signal_, 1, 0);
return bret;
}