refactor(stream): do some internal refactor.
This commit is contained in:
parent
67853b4a54
commit
24c6fe727f
|
@ -119,7 +119,16 @@ void streamQueueNextItemInSourceQ(SStreamQueue* pQueue, SStreamQueueItem** pItem
|
||||||
|
|
||||||
if (flag == STREAM_QUEUE__CHKPTFAILED) {
|
if (flag == STREAM_QUEUE__CHKPTFAILED) {
|
||||||
*pItem = pQueue->qChkptItem;
|
*pItem = pQueue->qChkptItem;
|
||||||
} else {
|
ASSERT(status != TASK_STATUS__CK && pQueue->qItem == NULL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (flag == STREAM_QUEUE__FAILED) {
|
||||||
|
*pItem = pQueue->qItem;
|
||||||
|
ASSERT(status != TASK_STATUS__CK && pQueue->qChkptItem == NULL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
pQueue->qChkptItem = NULL;
|
pQueue->qChkptItem = NULL;
|
||||||
taosReadQitem(pQueue->pChkptQueue, (void**)&pQueue->qChkptItem);
|
taosReadQitem(pQueue->pChkptQueue, (void**)&pQueue->qChkptItem);
|
||||||
if (pQueue->qChkptItem != NULL) {
|
if (pQueue->qChkptItem != NULL) {
|
||||||
|
@ -134,12 +143,8 @@ void streamQueueNextItemInSourceQ(SStreamQueue* pQueue, SStreamQueueItem** pItem
|
||||||
stDebug("in checkpoint status, not ready data in normal queue");
|
stDebug("in checkpoint status, not ready data in normal queue");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// let's try the ordinary input q
|
// let's try the ordinary input q
|
||||||
if (flag == STREAM_QUEUE__FAILED) {
|
|
||||||
*pItem = streamQueueCurItem(pQueue);
|
|
||||||
} else {
|
|
||||||
pQueue->qItem = NULL;
|
pQueue->qItem = NULL;
|
||||||
(void)taosGetQitem(pQueue->qall, &pQueue->qItem);
|
(void)taosGetQitem(pQueue->qall, &pQueue->qItem);
|
||||||
|
|
||||||
|
@ -150,7 +155,6 @@ void streamQueueNextItemInSourceQ(SStreamQueue* pQueue, SStreamQueueItem** pItem
|
||||||
|
|
||||||
*pItem = streamQueueCurItem(pQueue);
|
*pItem = streamQueueCurItem(pQueue);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void streamQueueProcessSuccess(SStreamQueue* queue) {
|
void streamQueueProcessSuccess(SStreamQueue* queue) {
|
||||||
if (atomic_load_8(&queue->status) != STREAM_QUEUE__PROCESSING) {
|
if (atomic_load_8(&queue->status) != STREAM_QUEUE__PROCESSING) {
|
||||||
|
|
Loading…
Reference in New Issue