[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

@ -71,8 +71,11 @@ void get_tenant_ids(uint64_t *ids, int cap, int &cnt)
{
auto *instance = ObMallocAllocator::get_instance();
cnt = 0;
for (uint64_t tenant_id = 1; tenant_id <= ObMallocAllocator::get_max_used_tenant_id() && cnt < cap; ++tenant_id) {
if (nullptr != instance->get_tenant_ctx_allocator(tenant_id, 0)) {
for (uint64_t tenant_id = 1; tenant_id <= instance->get_max_used_tenant_id() && cnt < cap; ++tenant_id) {
if (nullptr != instance->get_tenant_ctx_allocator(tenant_id,
ObCtxIds::DEFAULT_CTX_ID) ||
nullptr != instance->get_tenant_ctx_allocator_unrecycled(tenant_id,
ObCtxIds::DEFAULT_CTX_ID)) {
ids[cnt++] = tenant_id;
}
}