diff --git a/src/pl/ob_pl_user_type.cpp b/src/pl/ob_pl_user_type.cpp index 4d1c8e197..6b7459482 100644 --- a/src/pl/ob_pl_user_type.cpp +++ b/src/pl/ob_pl_user_type.cpp @@ -4500,6 +4500,15 @@ int64_t ObPLAssocArray::get_last() return last_; } +ObIAllocator& ObPLOpaque::get_allocator() +{ + int ret = OB_SUCCESS; + if (allocator_.used() > 1024 * 1024 * 512) { + LOG_ERROR("opaque allocator hold too much memory", K(allocator_.used())); + } + return allocator_; +} + int ObPLOpaque::deep_copy(ObPLOpaque *dst) { int ret = OB_SUCCESS; diff --git a/src/pl/ob_pl_user_type.h b/src/pl/ob_pl_user_type.h index f67985855..7ee6b87a9 100644 --- a/src/pl/ob_pl_user_type.h +++ b/src/pl/ob_pl_user_type.h @@ -1206,7 +1206,7 @@ public: inline bool is_xmltype() const { return ObPLOpaqueType::PL_XML_TYPE == type_; } inline bool is_json_type() const { return ObPLOpaqueType::PL_JSON_TYPE == type_; } - inline ObIAllocator& get_allocator() { return allocator_; } + ObIAllocator& get_allocator(); // { return allocator_; } virtual int deep_copy(ObPLOpaque *dst);