fix(stream): correct count down the ready tasks.
This commit is contained in:
parent
adfc1fb927
commit
b903872a4e
|
@ -993,16 +993,17 @@ int32_t streamTaskUpdateCheckInfo(STaskCheckInfo* pInfo, int32_t taskId, int32_t
|
||||||
SDownstreamStatusInfo* p = taosArrayGet(pInfo->pList, i);
|
SDownstreamStatusInfo* p = taosArrayGet(pInfo->pList, i);
|
||||||
if (p->taskId == taskId) {
|
if (p->taskId == taskId) {
|
||||||
ASSERT(reqId == p->reqId);
|
ASSERT(reqId == p->reqId);
|
||||||
p->status = status;
|
|
||||||
p->rspTs = rspTs;
|
|
||||||
|
|
||||||
// count down one, since it is ready now
|
// count down one, since it is ready now
|
||||||
if (p->status == TASK_DOWNSTREAM_READY) {
|
if ((p->status != TASK_DOWNSTREAM_READY) && (status == TASK_DOWNSTREAM_READY)) {
|
||||||
*pNotReady = atomic_sub_fetch_32(&pInfo->notReadyTasks, 1);
|
*pNotReady = atomic_sub_fetch_32(&pInfo->notReadyTasks, 1);
|
||||||
} else {
|
} else {
|
||||||
*pNotReady = pInfo->notReadyTasks;
|
*pNotReady = pInfo->notReadyTasks;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p->status = status;
|
||||||
|
p->rspTs = rspTs;
|
||||||
|
|
||||||
taosThreadMutexUnlock(&pInfo->checkInfoLock);
|
taosThreadMutexUnlock(&pInfo->checkInfoLock);
|
||||||
return TSDB_CODE_SUCCESS;
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue