diff --git a/src/storage/tx/ob_trans_part_ctx.cpp b/src/storage/tx/ob_trans_part_ctx.cpp index e93b15e872..51c33e6df1 100644 --- a/src/storage/tx/ob_trans_part_ctx.cpp +++ b/src/storage/tx/ob_trans_part_ctx.cpp @@ -1505,7 +1505,6 @@ int ObPartTransCtx::recover_tx_ctx_table_info(ObTxCtxTableInfo &ctx_info) exec_info_.mds_buffer_ctx_array_.reset(); if (OB_FAIL(ret)) { // do nothing - } else if (FALSE_IT(ctx_info.exec_info_.mrege_buffer_ctx_array_to_multi_data_source())) { } else if (OB_FAIL(deep_copy_mds_array_(ctx_info.exec_info_.multi_data_source_, _unused_))) { TRANS_LOG(WARN, "deep copy ctx_info mds_array failed", K(ret)); } else if (FALSE_IT(mt_ctx_.update_checksum(exec_info_.checksum_, diff --git a/src/storage/tx_table/ob_tx_ctx_table.cpp b/src/storage/tx_table/ob_tx_ctx_table.cpp index f0b6125665..ea18095775 100644 --- a/src/storage/tx_table/ob_tx_ctx_table.cpp +++ b/src/storage/tx_table/ob_tx_ctx_table.cpp @@ -216,14 +216,16 @@ int ObTxCtxTableRecoverHelper::recover(const blocksstable::ObDatumRow &row, if (OB_FAIL(ctx_info_.deserialize(deserialize_buf, deserialize_buf_length, pos, tx_data_table))) { STORAGE_LOG(WARN, "failed to deserialize status_info", K(ret), K_(ctx_info)); + } else if (FALSE_IT(ctx_info_.exec_info_.mrege_buffer_ctx_array_to_multi_data_source())) { } else if (OB_FAIL(recover_one_tx_ctx_(ls_tx_ctx_mgr, ctx_info_))) { + // heap memory needed be freed, but can not do this in destruction, cause tx_buffer_node has no value sematics + ctx_info_.exec_info_.clear_buffer_ctx_in_multi_data_source(); STORAGE_LOG(WARN, "failed to recover_one_tx_ctx_", K(ret), K(ctx_info_)); } else { + // heap memory needed be freed, but can not do this in destruction, cause tx_buffer_node has no value sematics + ctx_info_.exec_info_.clear_buffer_ctx_in_multi_data_source(); finish_recover_one_tx_ctx_(); } - // clear it cause buffer ctx memory need released - // and ObString in buffer node no need released cause it's just part reference of deserialized buffer - ctx_info_.exec_info_.clear_buffer_ctx_in_multi_data_source(); } if (OB_SUCC(ret)) {