fix(stream): update the merge result check.
This commit is contained in:
parent
91dcf63933
commit
715b6428aa
|
@ -219,13 +219,17 @@ int32_t streamQueueMergeQueueItem(SStreamQueueItem* dst, SStreamQueueItem* pElem
|
|||
if (dst->type == STREAM_INPUT__DATA_BLOCK && pElem->type == STREAM_INPUT__DATA_BLOCK) {
|
||||
SStreamDataBlock* pBlock = (SStreamDataBlock*)dst;
|
||||
SStreamDataBlock* pBlockSrc = (SStreamDataBlock*)pElem;
|
||||
(void) taosArrayAddAll(pBlock->blocks, pBlockSrc->blocks);
|
||||
void* px = taosArrayAddAll(pBlock->blocks, pBlockSrc->blocks);
|
||||
if (px == NULL) {
|
||||
return terrno;
|
||||
}
|
||||
|
||||
taosArrayDestroy(pBlockSrc->blocks);
|
||||
streamQueueItemIncSize(dst, streamQueueItemGetSize(pElem));
|
||||
|
||||
taosFreeQitem(pElem);
|
||||
*pRes = dst;
|
||||
return TSDB_CODE_SUCCESS;
|
||||
return code;
|
||||
} else if (dst->type == STREAM_INPUT__MERGED_SUBMIT && pElem->type == STREAM_INPUT__DATA_SUBMIT) {
|
||||
SStreamMergedSubmit* pMerged = (SStreamMergedSubmit*)dst;
|
||||
SStreamDataSubmit* pBlockSrc = (SStreamDataSubmit*)pElem;
|
||||
|
|
|
@ -231,13 +231,14 @@ EExtractDataCode streamTaskGetDataFromInputQ(SStreamTask* pTask, SStreamQueueIte
|
|||
if (*pInput == NULL) {
|
||||
ASSERT((*numOfBlocks) == 0);
|
||||
*pInput = qItem;
|
||||
} else {
|
||||
// merge current block failed, let's handle the already merged blocks.
|
||||
} else { // merge current block failed, let's handle the already merged blocks.
|
||||
void* newRet = NULL;
|
||||
int32_t code = streamQueueMergeQueueItem(*pInput, qItem, (SStreamQueueItem**)&newRet);
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
stError("s-task:%s failed to merge blocks from inputQ, numOfBlocks:%d, code:%s", id, *numOfBlocks,
|
||||
tstrerror(terrno));
|
||||
if (newRet == NULL) {
|
||||
if (code) {
|
||||
stError("s-task:%s failed to merge blocks from inputQ, numOfBlocks:%d, code:%s", id, *numOfBlocks,
|
||||
tstrerror(code));
|
||||
}
|
||||
|
||||
*blockSize = streamQueueItemGetSize(*pInput);
|
||||
if (taskLevel == TASK_LEVEL__SINK) {
|
||||
|
|
Loading…
Reference in New Issue