Merge remote-tracking branch 'origin/enh/triggerCheckPoint2' into enh/triggerCheckPoint2
This commit is contained in:
commit
1e636a2ef9
|
@ -220,20 +220,29 @@ int32_t vnodeSnapRead(SVSnapReader *pReader, uint8_t **ppData, uint32_t *nData)
|
|||
}
|
||||
|
||||
// STREAM ============
|
||||
vInfo("stream task start");
|
||||
if (!pReader->streamTaskDone) {
|
||||
if (pReader->pStreamTaskReader == NULL) {
|
||||
vInfo("stream task start 1");
|
||||
code = streamTaskSnapReaderOpen(pReader->pVnode->pTq, pReader->sver, pReader->sver, &pReader->pStreamTaskReader);
|
||||
if (code) goto _err;
|
||||
if (code) {
|
||||
vInfo("stream task start err");
|
||||
goto _err;
|
||||
}
|
||||
}
|
||||
code = streamTaskSnapRead(pReader->pStreamTaskReader, ppData);
|
||||
vInfo("stream task start 2");
|
||||
if (code) {
|
||||
vInfo("stream task start 3");
|
||||
goto _err;
|
||||
} else {
|
||||
if (*ppData) {
|
||||
goto _exit;
|
||||
vInfo("stream task start 4");
|
||||
} else {
|
||||
pReader->streamTaskDone = 1;
|
||||
code = streamTaskSnapReaderClose(pReader->pStreamTaskReader);
|
||||
vInfo("stream task start 5");
|
||||
if (code) goto _err;
|
||||
pReader->pStreamTaskReader = NULL;
|
||||
}
|
||||
|
|
|
@ -390,6 +390,9 @@ int64_t streamGetLatestCheckpointId(SStreamMeta* pMeta) {
|
|||
|
||||
tdbTbcMoveToFirst(pCur);
|
||||
while (tdbTbcNext(pCur, &pKey, &kLen, &pVal, &vLen) == 0) {
|
||||
if (pVal != NULL && vLen != 0) {
|
||||
break;
|
||||
}
|
||||
SCheckpointInfo info;
|
||||
tDecoderInit(&decoder, (uint8_t*)pVal, vLen);
|
||||
if (tDecodeStreamTaskChkInfo(&decoder, &info) < 0) {
|
||||
|
|
Loading…
Reference in New Issue