From 4a7f055b470a2ad3995e852fb75ec9a560fda547 Mon Sep 17 00:00:00 2001 From: KyrielightWei Date: Thu, 20 Jul 2023 06:12:29 +0000 Subject: [PATCH] free retain_ctx_func memory in part_ctx's destroy --- src/storage/tx/ob_trans_part_ctx.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/storage/tx/ob_trans_part_ctx.cpp b/src/storage/tx/ob_trans_part_ctx.cpp index 7aed14f660..f2787801cf 100755 --- a/src/storage/tx/ob_trans_part_ctx.cpp +++ b/src/storage/tx/ob_trans_part_ctx.cpp @@ -243,6 +243,11 @@ void ObPartTransCtx::destroy() FORCE_PRINT_TRACE(tlog_, "[missing callback scheduler] "); } + if (OB_NOT_NULL(retain_ctx_func_ptr_)) { + TRANS_LOG(INFO, "the memory of retain_ctx_func_ptr is active, need free", K(ret), + KP(retain_ctx_func_ptr_), KPC(retain_ctx_func_ptr_), KPC(this)); + } + (void)try_gc_retain_ctx_func_(); if (NULL != tlog_) { print_trace_log_if_necessary_();