[CP] fix core when create_tg_tenant with no_memory

This commit is contained in:
tushicheng
2023-12-12 03:40:45 +00:00
committed by ob-robot
parent 65eccf7d40
commit db82b0b5cd
2 changed files with 10 additions and 6 deletions

View File

@ -35,10 +35,12 @@ namespace share
{
void ob_init_create_func()
{
#define TG_DEF(id, name, type, args...) \
#define TG_DEF(id, name, type, args...) \
lib::create_funcs_[lib::TGDefIDs::id] = []() { \
auto ret = OB_NEW(TG_##type, SET_USE_500("tg"), args); \
ret->attr_ = {#name, TGType::type}; \
TG_##type *ret = OB_NEW(TG_##type, SET_USE_500("tg"), args); \
if (NULL != ret) { \
ret->attr_ = {#name, TGType::type}; \
} \
return ret; \
};
#include "share/ob_thread_define.h"