提交 cb4171c3 编写于 作者: N nroskill 提交者: wangzelin.wzl

fix trace_id memory leak

上级 f75f5992
...@@ -199,11 +199,8 @@ struct ObCurTraceId { ...@@ -199,11 +199,8 @@ struct ObCurTraceId {
inline static TraceId* get_trace_id() inline static TraceId* get_trace_id()
{ {
static RLOCAL(TraceId*, TRACE_ID); static thread_local TraceId TRACE_ID;
if (OB_UNLIKELY(TRACE_ID == nullptr)) { return &TRACE_ID;
TRACE_ID = new (std::nothrow) TraceId();
}
return TRACE_ID;
} }
inline static void mark_user_request() inline static void mark_user_request()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册