add double-destroy check for MemoryContext
This commit is contained in:
@ -489,7 +489,7 @@ private:
|
||||
static const int64_t MAX_BUCKET_NUM = 131072; // 1M = 131072 * 8
|
||||
static const int64_t MAX_PART_LEVEL = 4;
|
||||
uint64_t tenant_id_;
|
||||
lib::MemoryContext* mem_context_;
|
||||
lib::MemoryContext mem_context_;
|
||||
common::ObIAllocator* alloc_;
|
||||
common::ObArenaAllocator* arena_alloc_;
|
||||
ObPartitionExtendHashTable<HashCol> hash_table_;
|
||||
@ -544,7 +544,7 @@ inline int ObBasicHashPartInfrastructure<HashCol, HashRowStore>::init_mem_contex
|
||||
lib::ContextParam param;
|
||||
param.set_properties(lib::USE_TL_PAGE_OPTIONAL)
|
||||
.set_mem_attr(tenant_id, common::ObModIds::OB_ARENA_HASH_JOIN, common::ObCtxIds::WORK_AREA);
|
||||
if (OB_FAIL(CURRENT_CONTEXT.CREATE_CONTEXT(mem_context_, param))) {
|
||||
if (OB_FAIL(CURRENT_CONTEXT->CREATE_CONTEXT(mem_context_, param))) {
|
||||
SQL_ENG_LOG(WARN, "create entity failed", K(ret));
|
||||
} else if (OB_ISNULL(mem_context_)) {
|
||||
SQL_ENG_LOG(WARN, "mem entity is null", K(ret));
|
||||
|
||||
@ -492,7 +492,7 @@ private:
|
||||
static const int64_t MAX_BUCKET_NUM = 131072; // 1M = 131072 * 8
|
||||
static const int64_t MAX_PART_LEVEL = 4;
|
||||
uint64_t tenant_id_;
|
||||
lib::MemoryContext* mem_context_;
|
||||
lib::MemoryContext mem_context_;
|
||||
common::ObIAllocator* alloc_;
|
||||
common::ObArenaAllocator* arena_alloc_;
|
||||
ObHashPartitionExtendHashTable<HashCol> hash_table_;
|
||||
@ -552,7 +552,7 @@ inline int ObHashPartInfrastructure<HashCol, HashRowStore>::init_mem_context(uin
|
||||
param.set_properties(lib::USE_TL_PAGE_OPTIONAL)
|
||||
.set_mem_attr(tenant_id, common::ObModIds::OB_ARENA_HASH_JOIN, common::ObCtxIds::WORK_AREA)
|
||||
.set_ablock_size(lib::INTACT_MIDDLE_AOBJECT_SIZE);
|
||||
if (OB_FAIL(CURRENT_CONTEXT.CREATE_CONTEXT(mem_context_, param))) {
|
||||
if (OB_FAIL(CURRENT_CONTEXT->CREATE_CONTEXT(mem_context_, param))) {
|
||||
SQL_ENG_LOG(WARN, "create entity failed", K(ret));
|
||||
} else if (OB_ISNULL(mem_context_)) {
|
||||
SQL_ENG_LOG(WARN, "mem entity is null", K(ret));
|
||||
|
||||
@ -212,7 +212,7 @@ int ObMaterial::get_all_row_from_child(ObMaterialCtx& mat_ctx, ObSQLSessionInfo&
|
||||
lib::ContextParam param;
|
||||
param.set_mem_attr(tenant_id, ObModIds::OB_SQL_SORT_ROW, ObCtxIds::WORK_AREA)
|
||||
.set_properties(lib::USE_TL_PAGE_OPTIONAL);
|
||||
if (OB_FAIL(CURRENT_CONTEXT.CREATE_CONTEXT(mat_ctx.mem_context_, param))) {
|
||||
if (OB_FAIL(CURRENT_CONTEXT->CREATE_CONTEXT(mat_ctx.mem_context_, param))) {
|
||||
LOG_WARN("create entity failed", K(ret));
|
||||
} else if (OB_ISNULL(mat_ctx.mem_context_)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
|
||||
@ -104,7 +104,7 @@ private:
|
||||
}
|
||||
|
||||
private:
|
||||
lib::MemoryContext* mem_context_;
|
||||
lib::MemoryContext mem_context_;
|
||||
ObChunkRowStore row_store_;
|
||||
ObChunkRowStore::Iterator row_store_it_;
|
||||
int64_t row_id_;
|
||||
|
||||
@ -86,7 +86,7 @@ int ObMaterialOp::get_all_row_from_child(ObSQLSessionInfo& session)
|
||||
lib::ContextParam param;
|
||||
param.set_mem_attr(tenant_id, ObModIds::OB_SQL_SORT_ROW, ObCtxIds::WORK_AREA)
|
||||
.set_properties(lib::USE_TL_PAGE_OPTIONAL);
|
||||
if (OB_FAIL(CURRENT_CONTEXT.CREATE_CONTEXT(mem_context_, param))) {
|
||||
if (OB_FAIL(CURRENT_CONTEXT->CREATE_CONTEXT(mem_context_, param))) {
|
||||
LOG_WARN("create entity failed", K(ret));
|
||||
} else if (OB_ISNULL(mem_context_)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
|
||||
@ -69,7 +69,7 @@ private:
|
||||
}
|
||||
|
||||
private:
|
||||
lib::MemoryContext* mem_context_;
|
||||
lib::MemoryContext mem_context_;
|
||||
ObChunkDatumStore datum_store_;
|
||||
ObChunkDatumStore::Iterator datum_store_it_;
|
||||
friend class ObValues;
|
||||
|
||||
Reference in New Issue
Block a user