fix(stream): check return value.
This commit is contained in:
parent
d24bc139a5
commit
46dcdf36b7
|
@ -144,11 +144,20 @@ void streamQueueNextItemInSourceQ(SStreamQueue* pQueue, SStreamQueueItem** pItem
|
||||||
|
|
||||||
// let's try the ordinary input q
|
// let's try the ordinary input q
|
||||||
pQueue->qItem = NULL;
|
pQueue->qItem = NULL;
|
||||||
(void)taosGetQitem(pQueue->qall, &pQueue->qItem);
|
int32_t code = taosGetQitem(pQueue->qall, &pQueue->qItem);
|
||||||
|
if (code) {
|
||||||
|
stError("s-task:%s failed to extract data from inputQ, code:%s", id, tstrerror(code));
|
||||||
|
}
|
||||||
|
|
||||||
if (pQueue->qItem == NULL) {
|
if (pQueue->qItem == NULL) {
|
||||||
(void)taosReadAllQitems(pQueue->pQueue, pQueue->qall);
|
code = taosReadAllQitems(pQueue->pQueue, pQueue->qall);
|
||||||
(void)taosGetQitem(pQueue->qall, &pQueue->qItem);
|
if (code) {
|
||||||
|
stError("s-task:%s failed to read qitem into qall, code:%s", id, tstrerror(code));
|
||||||
|
}
|
||||||
|
code = taosGetQitem(pQueue->qall, &pQueue->qItem);
|
||||||
|
if (code) {
|
||||||
|
stError("s-task:%s failed to extract data from inputQ(qall), code:%s", id, tstrerror(code));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*pItem = streamQueueCurItem(pQueue);
|
*pItem = streamQueueCurItem(pQueue);
|
||||||
|
|
Loading…
Reference in New Issue