Fix win buf mem leak
This commit is contained in:
@ -105,6 +105,7 @@ public:
|
|||||||
: ObPieceMsgCtx(op_id, task_cnt, timeout_ts), received_(0),
|
: ObPieceMsgCtx(op_id, task_cnt, timeout_ts), received_(0),
|
||||||
tenant_id_(tenant_id), whole_msg_() {}
|
tenant_id_(tenant_id), whole_msg_() {}
|
||||||
~ObWinbufPieceMsgCtx() = default;
|
~ObWinbufPieceMsgCtx() = default;
|
||||||
|
virtual void destroy() { whole_msg_.reset(); }
|
||||||
INHERIT_TO_STRING_KV("meta", ObPieceMsgCtx, K_(received));
|
INHERIT_TO_STRING_KV("meta", ObPieceMsgCtx, K_(received));
|
||||||
static int alloc_piece_msg_ctx(const ObWinbufPieceMsg &pkt,
|
static int alloc_piece_msg_ctx(const ObWinbufPieceMsg &pkt,
|
||||||
ObPxCoordInfo &coord_info,
|
ObPxCoordInfo &coord_info,
|
||||||
|
|||||||
@ -25,6 +25,7 @@ class ObPieceMsgCtx
|
|||||||
public:
|
public:
|
||||||
ObPieceMsgCtx(uint64_t op_id, int64_t task_cnt, int64_t timeout_ts)
|
ObPieceMsgCtx(uint64_t op_id, int64_t task_cnt, int64_t timeout_ts)
|
||||||
: op_id_(op_id), task_cnt_(task_cnt), timeout_ts_(timeout_ts) {}
|
: op_id_(op_id), task_cnt_(task_cnt), timeout_ts_(timeout_ts) {}
|
||||||
|
virtual ~ObPieceMsgCtx() {}
|
||||||
VIRTUAL_TO_STRING_KV(K_(op_id), K_(task_cnt));
|
VIRTUAL_TO_STRING_KV(K_(op_id), K_(task_cnt));
|
||||||
virtual void destroy() {}
|
virtual void destroy() {}
|
||||||
uint64_t op_id_; // 哪个算子使用 datahub 服务
|
uint64_t op_id_; // 哪个算子使用 datahub 服务
|
||||||
@ -42,6 +43,7 @@ public:
|
|||||||
for (int i = 0; i < ctxs_.count(); ++i) {
|
for (int i = 0; i < ctxs_.count(); ++i) {
|
||||||
if (OB_NOT_NULL(ctxs_[i])) {
|
if (OB_NOT_NULL(ctxs_[i])) {
|
||||||
ctxs_[i]->destroy();
|
ctxs_[i]->destroy();
|
||||||
|
ctxs_[i]->~ObPieceMsgCtx();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ctxs_.reset();
|
ctxs_.reset();
|
||||||
|
|||||||
Reference in New Issue
Block a user