[FEAT MERGE] del_tenant_memleak branch

Co-authored-by: HaHaJeff <jeffzhouhhh@gmail.com>
This commit is contained in:
obdev
2023-01-28 19:29:23 +08:00
committed by ob-robot
parent e3b89cd741
commit ba19ba90e0
179 changed files with 3235 additions and 2291 deletions

View File

@ -89,13 +89,8 @@ int ObFifoArena::init(uint64_t tenant_id)
if (OB_ISNULL(allocator)) {
ret = OB_INIT_FAIL;
OB_LOG(ERROR, "mallocator instance is NULLL", K(ret));
} else if (OB_ISNULL(allocator_ = allocator->get_tenant_ctx_allocator(tenant_id, ctx_id))) {
if (OB_FAIL(allocator->create_tenant_ctx_allocator(tenant_id, ctx_id))) {
OB_LOG(ERROR, "fail to create tenant allocator", K(tenant_id), K(ctx_id), K(ret));
} else if (OB_ISNULL(allocator_ = allocator->get_tenant_ctx_allocator(tenant_id, ctx_id))) {
ret = OB_ERR_UNEXPECTED;
OB_LOG(ERROR, "tenant allocator is null", K(tenant_id), K(ctx_id), K(ret));
}
} else {
allocator_ = allocator;
}
if (OB_SUCC(ret)) {

View File

@ -231,7 +231,7 @@ private:
static const int64_t DEFAULT_TRIGGER_PERCENTAGE = 100;
static const int64_t DEFAULT_DURATION = 60 * 60 * 1000 * 1000L;//us
lib::ObMemAttr attr_;
ObIAllocator* allocator_;
lib::ObIAllocator *allocator_;
int64_t nway_;
int64_t allocated_;
int64_t reclaimed_;

View File

@ -81,6 +81,12 @@ void ObTenantMutilAllocator::try_purge()
clog_ge_alloc_.purge_extra_cached_block(0);
inner_table_replay_task_alloc_.purge_extra_cached_block(0);
user_table_replay_task_alloc_.purge_extra_cached_block(0);
log_io_flush_log_task_alloc_.purge_extra_cached_block(0);
log_io_truncate_log_task_alloc_.purge_extra_cached_block(0);
log_io_flush_meta_task_alloc_.purge_extra_cached_block(0);
log_io_truncate_prefix_blocks_task_alloc_.purge_extra_cached_block(0);
palf_fetch_log_task_alloc_.purge_extra_cached_block(0);
replay_log_task_alloc_.purge_extra_cached_block(0);
}
void *ObTenantMutilAllocator::ge_alloc(const int64_t size)