Merge pull request #26314 from taosdata/fix/TS-2518-3.0

fix/TS-2518
This commit is contained in:
Hongze Cheng 2024-07-02 18:52:02 +08:00 committed by GitHub
commit 991d43b610
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View File

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

View File

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