[FEAT MERGE] impl vectorization 2.0

Co-authored-by: oceanoverflow <oceanoverflow@gmail.com>
Co-authored-by: hezuojiao <hezuojiao@gmail.com>
Co-authored-by: Monk-Liu <1152761042@qq.com>
This commit is contained in:
obdev
2024-02-08 05:32:52 +00:00
committed by ob-robot
parent 64a276a23f
commit 0d0b11c0cc
592 changed files with 358124 additions and 303277 deletions

View File

@ -46,6 +46,9 @@ int ObSqlMemMgrProcessor::init(
if (OB_ISNULL(exec_ctx)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("failed to get exec ctx", K(ret));
} else if (OB_ISNULL(allocator)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("failed to get allocator", K(ret));
} else if (OB_FAIL(profile_.set_exec_info(*exec_ctx))) {
LOG_WARN("failed to set exec info", K(ret));
} else if (OB_FAIL(alloc_dir_id(dir_id_))) {
@ -103,6 +106,13 @@ int ObSqlMemMgrProcessor::init(
if (!profile_.get_auto_policy()) {
profile_.set_max_bound(max_mem_size);
}
if (OB_SUCC(ret) && nullptr == dummy_alloc_) {
dummy_alloc_ = allocator;
if (OB_ISNULL(dummy_ptr_ = static_cast<char *> (dummy_alloc_->alloc(sizeof(char))))) {
ret = OB_ALLOCATE_MEMORY_FAILED;
LOG_WARN("failed to alloc dummy memory", K(ret));
}
}
// 如果开启了sql memory manager,但由于预估数据量比较少,不需要注册到manager里,这里限制为MAX_SQL_MEM_SIZE
origin_max_mem_size_ = max_mem_size;
default_available_mem_size_ = tmp_enable_auto_mem_mgr ? MAX_SQL_MEM_SIZE : max_mem_size;
@ -296,6 +306,11 @@ void ObSqlMemMgrProcessor::unregister_profile()
destroy();
LOG_DEBUG("trace unregister work area profile", K(profile_));
}
if (OB_NOT_NULL(dummy_ptr_)) {
dummy_alloc_->free(dummy_ptr_);
dummy_ptr_ = nullptr;
dummy_alloc_ = nullptr;
}
}
int ObSqlMemMgrProcessor::alloc_dir_id(int64_t &dir_id)