Fix the bug that interm results on the peer end are not cleaned

This commit is contained in:
obdev 2023-09-22 07:10:04 +00:00 committed by ob-robot
parent a1a3754a47
commit 08105af756
2 changed files with 4 additions and 3 deletions

View File

@ -876,7 +876,7 @@ class ObPxCleanDtlIntermResArgs
OB_UNIS_VERSION(1);
public:
ObPxCleanDtlIntermResArgs() : info_(), batch_size_(0) {}
~ObPxCleanDtlIntermResArgs() { }
~ObPxCleanDtlIntermResArgs() { reset(); }
void reset()
{
info_.reset();

View File

@ -603,7 +603,8 @@ bool ObSerialDfoScheduler::CleanDtlIntermRes::operator()(const ObAddr &attr,
LOG_WARN("send clean dtl interm result rpc failed", K(ret), K(attr), KPC(arg));
}
LOG_TRACE("clean dtl res map", K(attr), K(*arg));
delete arg;
arg->~ObPxCleanDtlIntermResArgs();
arg = NULL;
return true;
}
@ -642,7 +643,7 @@ void ObSerialDfoScheduler::clean_dtl_interm_result(ObExecContext &exec_ctx)
if (!map.is_inited() && OB_FAIL(map.init("CleanDtlRes", OB_SYS_TENANT_ID))) {
LOG_WARN("init map failed", K(ret));
} else if (OB_FAIL(map.get(sqc.get_exec_addr(), arg))) {
if (OB_HASH_NOT_EXIST == ret) {
if (OB_ENTRY_NOT_EXIST == ret) {
void *buf = NULL;
if (OB_ISNULL(buf = allocator.alloc(sizeof(ObPxCleanDtlIntermResArgs)))) {
ret = OB_ALLOCATE_MEMORY_FAILED;