fix non-tenant thread malloc with OB_INVALID_TENANT_ID
This commit is contained in:
@ -112,6 +112,10 @@ void *ObMallocAllocator::alloc(const int64_t size, const oceanbase::lib::ObMemAt
|
|||||||
#else
|
#else
|
||||||
const bool do_not_use_me = false;
|
const bool do_not_use_me = false;
|
||||||
#endif
|
#endif
|
||||||
|
if (OB_INVALID_TENANT_ID == inner_attr.tenant_id_) {
|
||||||
|
inner_attr.tenant_id_ = OB_SERVER_TENANT_ID;
|
||||||
|
LOG_ERROR("invalid tenant id", K(attr.tenant_id_), K(inner_attr.tenant_id_), K(ret));
|
||||||
|
}
|
||||||
if (OB_SUCCESS != ret) {
|
if (OB_SUCCESS != ret) {
|
||||||
} else if (OB_UNLIKELY(0 == inner_attr.tenant_id_)
|
} else if (OB_UNLIKELY(0 == inner_attr.tenant_id_)
|
||||||
|| OB_UNLIKELY(INT64_MAX == inner_attr.tenant_id_)) {
|
|| OB_UNLIKELY(INT64_MAX == inner_attr.tenant_id_)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user