handle return code
This commit is contained in:
parent
e53fbe27e8
commit
ef25d8ca36
|
@ -54,14 +54,18 @@ static void doScan(SMeta *pMeta) {
|
||||||
|
|
||||||
code = tdbTbcOpen(pMeta->pTbDb, &cursor, NULL);
|
code = tdbTbcOpen(pMeta->pTbDb, &cursor, NULL);
|
||||||
if (code) {
|
if (code) {
|
||||||
taosCloseFile(&fp);
|
if (taosCloseFile(&fp) != 0) {
|
||||||
|
metaError("failed to close file:%s, reason:%s", path, tstrerror(terrno));
|
||||||
|
}
|
||||||
metaError("failed to open table.db cursor, reason:%s", tstrerror(terrno));
|
metaError("failed to open table.db cursor, reason:%s", tstrerror(terrno));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
code = tdbTbcMoveToFirst(cursor);
|
code = tdbTbcMoveToFirst(cursor);
|
||||||
if (code) {
|
if (code) {
|
||||||
taosCloseFile(&fp);
|
if (taosCloseFile(&fp) != 0) {
|
||||||
|
metaError("failed to close file:%s, reason:%s", path, tstrerror(terrno));
|
||||||
|
}
|
||||||
tdbTbcClose(cursor);
|
tdbTbcClose(cursor);
|
||||||
metaError("failed to move to first, reason:%s", tstrerror(terrno));
|
metaError("failed to move to first, reason:%s", tstrerror(terrno));
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue