From cfa9435a203e8470a470b104f2a7f5449437e6a9 Mon Sep 17 00:00:00 2001 From: dapan1121 Date: Tue, 16 Jul 2024 16:26:01 +0800 Subject: [PATCH] fix: invalid ref id issue --- source/libs/scheduler/src/schJob.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/libs/scheduler/src/schJob.c b/source/libs/scheduler/src/schJob.c index 3f771157d9..a8e2e79aee 100644 --- a/source/libs/scheduler/src/schJob.c +++ b/source/libs/scheduler/src/schJob.c @@ -822,12 +822,13 @@ int32_t schInitJob(int64_t *pJobId, SSchedulerReq *pReq) { } } pJob->pDag = pReq->pDag; - pJob->allocatorRefId = nodesMakeAllocatorWeakRef(pReq->allocatorRefId); - if (pJob->allocatorRefId <= 0) { - qError("QID:0x%" PRIx64 " nodesMakeAllocatorWeakRef failed", pReq->pDag->queryId); - SCH_ERR_JRET(terrno); + if (pReq->allocatorRefId > 0) { + pJob->allocatorRefId = nodesMakeAllocatorWeakRef(pReq->allocatorRefId); + if (pJob->allocatorRefId <= 0) { + qError("QID:0x%" PRIx64 " nodesMakeAllocatorWeakRef failed", pReq->pDag->queryId); + SCH_ERR_JRET(terrno); + } } - pJob->chkKillFp = pReq->chkKillFp; pJob->chkKillParam = pReq->chkKillParam; pJob->userRes.execFp = pReq->execFp;