Resolving memory-leak by adding px clean up

This commit is contained in:
obdev
2023-02-07 16:07:07 +08:00
committed by ob-robot
parent cde81bf4b1
commit 2a1917b23b
18 changed files with 373 additions and 178 deletions

View File

@ -0,0 +1,31 @@
// Copyright (c) 2022-present Oceanbase Inc. All Rights Reserved.
// Author:
// yuya.yu <yuya.yu@oceanbase.com>
#pragma once
#include "lib/ob_define.h"
namespace oceanbase
{
namespace sql
{
class ObExecContext;
class ObPhysicalPlan;
class ObTableDirectInsertService
{
public:
static bool is_direct_insert(const ObPhysicalPlan &phy_plan);
// all insert-tasks within an insert into select clause are wrapped by a single direct insert instance
static int start_direct_insert(ObExecContext &ctx, ObPhysicalPlan &plan);
static int commit_direct_insert(ObExecContext &ctx, ObPhysicalPlan &plan);
static int finish_direct_insert(ObExecContext &ctx, ObPhysicalPlan &plan);
// each insert-task is processed in a single thread and is wrapped by a table load trans
static int open_task(const uint64_t table_id, const int64_t task_id);
static int close_task(const uint64_t table_id,
const int64_t task_id,
const int error_code = OB_SUCCESS);
};
} // namespace sql
} // namespace oceanbase