fix(stream): add some logs.
This commit is contained in:
parent
38bf2d24e7
commit
c3a3cf21fb
|
@ -645,10 +645,12 @@ static void doClear(void* pKey, void* pVal, TBC* pCur, SArray* pRecycleList) {
|
||||||
|
|
||||||
int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) {
|
int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) {
|
||||||
TBC* pCur = NULL;
|
TBC* pCur = NULL;
|
||||||
qInfo("vgId:%d load stream tasks from meta files", pMeta->vgId);
|
int32_t vgId = pMeta->vgId;
|
||||||
|
|
||||||
|
qInfo("vgId:%d load stream tasks from meta files", vgId);
|
||||||
|
|
||||||
if (tdbTbcOpen(pMeta->pTaskDb, &pCur, NULL) < 0) {
|
if (tdbTbcOpen(pMeta->pTaskDb, &pCur, NULL) < 0) {
|
||||||
qError("vgId:%d failed to open stream meta, code:%s", pMeta->vgId, tstrerror(terrno));
|
qError("vgId:%d failed to open stream meta, code:%s", vgId, tstrerror(terrno));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -663,6 +665,8 @@ int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) {
|
||||||
while (tdbTbcNext(pCur, &pKey, &kLen, &pVal, &vLen) == 0) {
|
while (tdbTbcNext(pCur, &pKey, &kLen, &pVal, &vLen) == 0) {
|
||||||
SStreamTask* pTask = taosMemoryCalloc(1, sizeof(SStreamTask));
|
SStreamTask* pTask = taosMemoryCalloc(1, sizeof(SStreamTask));
|
||||||
if (pTask == NULL) {
|
if (pTask == NULL) {
|
||||||
|
terrno = TSDB_CODE_OUT_OF_MEMORY;
|
||||||
|
qError("vgId:%d failed to load stream task from meta-files, code:%s", vgId, tstrerror(terrno));
|
||||||
doClear(pKey, pVal, pCur, pRecycleList);
|
doClear(pKey, pVal, pCur, pRecycleList);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -673,9 +677,8 @@ int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) {
|
||||||
doClear(pKey, pVal, pCur, pRecycleList);
|
doClear(pKey, pVal, pCur, pRecycleList);
|
||||||
tFreeStreamTask(pTask);
|
tFreeStreamTask(pTask);
|
||||||
qError(
|
qError(
|
||||||
"stream read incompatible data, rm %s/vnode/vnode*/tq/stream if taosd cannot start, and rebuild stream "
|
"vgId:%d stream read incompatible data, rm %s/vnode/vnode*/tq/stream if taosd cannot start, and rebuild stream "
|
||||||
"manually",
|
"manually", vgId, tsDataDir);
|
||||||
tsDataDir);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
tDecoderClear(&decoder);
|
tDecoderClear(&decoder);
|
||||||
|
@ -732,6 +735,7 @@ int32_t streamMetaLoadAllTasks(SStreamMeta* pMeta) {
|
||||||
tdbFree(pKey);
|
tdbFree(pKey);
|
||||||
tdbFree(pVal);
|
tdbFree(pVal);
|
||||||
if (tdbTbcClose(pCur) < 0) {
|
if (tdbTbcClose(pCur) < 0) {
|
||||||
|
qError("vgId:%d failed to close meta-file cursor", vgId);
|
||||||
taosArrayDestroy(pRecycleList);
|
taosArrayDestroy(pRecycleList);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue