diff --git a/src/storage/blocksstable/ob_tmp_file_store.cpp b/src/storage/blocksstable/ob_tmp_file_store.cpp index 1bd293b4a8..115aa6e858 100644 --- a/src/storage/blocksstable/ob_tmp_file_store.cpp +++ b/src/storage/blocksstable/ob_tmp_file_store.cpp @@ -741,10 +741,10 @@ ObTmpTenantMacroBlockManager::~ObTmpTenantMacroBlockManager() destroy(); } -int ObTmpTenantMacroBlockManager::init(common::ObIAllocator &allocator) +int ObTmpTenantMacroBlockManager::init(const uint64_t tenant_id, common::ObIAllocator &allocator) { int ret = OB_SUCCESS; - ObMemAttr attr = SET_USE_500(ObModIds::OB_TMP_BLOCK_MAP); + ObMemAttr attr(tenant_id, ObModIds::OB_TMP_BLOCK_MAP); if (IS_INIT) { ret = OB_INIT_TWICE; STORAGE_LOG(WARN, "ObTmpMacroBlockManager has been inited", K(ret)); @@ -947,7 +947,7 @@ int ObTmpTenantFileStore::init(const uint64_t tenant_id) } else if (OB_ISNULL(page_cache_ = &ObTmpPageCache::get_instance())) { ret = OB_ERR_UNEXPECTED; STORAGE_LOG(WARN, "fail to get the page cache", K(ret)); - } else if (OB_FAIL(tmp_block_manager_.init(allocator_))) { + } else if (OB_FAIL(tmp_block_manager_.init(tenant_id, allocator_))) { STORAGE_LOG(WARN, "fail to init the block manager for ObTmpFileStore", K(ret)); } else if (OB_FAIL(tmp_mem_block_manager_.init(tenant_id, allocator_))) { STORAGE_LOG(WARN, "fail to init memory block manager", K(ret)); diff --git a/src/storage/blocksstable/ob_tmp_file_store.h b/src/storage/blocksstable/ob_tmp_file_store.h index 81f1fc4f3d..419d6a3f37 100644 --- a/src/storage/blocksstable/ob_tmp_file_store.h +++ b/src/storage/blocksstable/ob_tmp_file_store.h @@ -218,7 +218,7 @@ class ObTmpTenantMacroBlockManager final public: ObTmpTenantMacroBlockManager(); ~ObTmpTenantMacroBlockManager(); - int init(common::ObIAllocator &allocator); + int init(const uint64_t tenant_id, common::ObIAllocator &allocator); void destroy(); int alloc_macro_block(const int64_t dir_id, const uint64_t tenant_id, ObTmpMacroBlock *&t_mblk); int free_macro_block(const int64_t block_id);