fix(tsdb): check code before load print log.

This commit is contained in:
Haojun Liao 2024-08-21 14:13:49 +08:00
parent b6084e64ce
commit 62f227ed66
1 changed files with 4 additions and 1 deletions

View File

@ -903,7 +903,10 @@ int32_t tLDataIterNextRow(SLDataIter *pIter, const char *idStr, bool* hasNext) {
pIter->rInfo.row = tsdbRowFromBlockData(pBlockData, pIter->iRow);
_exit:
if (code) {
tsdbError("failed to exec stt-file nextIter, lino:%d, code:%s, %s", lino, tstrerror(code), idStr);
}
*hasNext = (code == TSDB_CODE_SUCCESS) && (pIter->pSttBlk != NULL) && (pBlockData != NULL);
return code;
}