fix/TS-2518

This commit is contained in:
dmchen 2024-06-27 04:38:17 +00:00
parent b50c157ae1
commit 5001cab278
2 changed files with 5 additions and 2 deletions

View File

@ -731,6 +731,7 @@ _exit:
return code;
}
// return error code
int32_t tsdbOpenFS(STsdb *pTsdb, STFileSystem **fs, int8_t rollback) {
int32_t code;
int32_t lino;

View File

@ -44,7 +44,7 @@ int64_t tsdbGetEarliestTs(STsdb *pTsdb) {
* @param pVnode
* @param ppTsdb
* @param dir
* @return int
* @return int 0: success, -1: failed
*/
int tsdbOpen(SVnode *pVnode, STsdb **ppTsdb, const char *dir, STsdbKeepCfg *pKeepCfg, int8_t rollback, bool force) {
STsdb *pTsdb = NULL;
@ -79,7 +79,9 @@ int tsdbOpen(SVnode *pVnode, STsdb **ppTsdb, const char *dir, STsdbKeepCfg *pKee
}
// open tsdb
if (tsdbOpenFS(pTsdb, &pTsdb->pFS, rollback) < 0) {
int32_t code = tsdbOpenFS(pTsdb, &pTsdb->pFS, rollback);
if (code < 0) {
terrno = code;
goto _err;
}