From cbd974b7b62fc87f0dfdfa63e8c46bc93b17a9e0 Mon Sep 17 00:00:00 2001 From: Fengjingkun Date: Sun, 7 Apr 2024 02:45:25 +0000 Subject: [PATCH] fix allocator ctx in reserve mem mode --- src/storage/tablet/ob_tablet.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/storage/tablet/ob_tablet.cpp b/src/storage/tablet/ob_tablet.cpp index 21495e3c78..7b6f212408 100644 --- a/src/storage/tablet/ob_tablet.cpp +++ b/src/storage/tablet/ob_tablet.cpp @@ -4627,11 +4627,11 @@ int ObTablet::build_read_info(common::ObArenaAllocator &allocator, const ObTable { int ret = OB_SUCCESS; int64_t full_stored_col_cnt = 0; - common::ObArenaAllocator tmp_allocator(common::ObMemAttr(MTL_ID(), "TmpSchema")); + ObStorageSchema *storage_schema = nullptr; ObSEArray cols_desc; tablet = (tablet == nullptr) ? this : tablet; - if (OB_FAIL(tablet->load_storage_schema(tmp_allocator, storage_schema))) { + if (OB_FAIL(tablet->load_storage_schema(allocator, storage_schema))) { LOG_WARN("fail to load storage schema", K(ret)); } else if (OB_FAIL(storage_schema->get_mulit_version_rowkey_column_ids(cols_desc))) { LOG_WARN("fail to get rowkey column ids", K(ret), KPC(storage_schema)); @@ -4646,7 +4646,7 @@ int ObTablet::build_read_info(common::ObArenaAllocator &allocator, const ObTable cols_desc))) { LOG_WARN("fail to init rowkey read info", K(ret), KPC(storage_schema)); } - ObTabletObjLoadHelper::free(tmp_allocator, storage_schema); + ObTabletObjLoadHelper::free(allocator, storage_schema); return ret; }