From 53003ce30b5588b4ffbdf9b758b66348120b6504 Mon Sep 17 00:00:00 2001 From: Yihao Deng Date: Wed, 24 Jul 2024 01:38:43 +0000 Subject: [PATCH] refactor tq backend --- source/libs/stream/src/streamBackendRocksdb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/libs/stream/src/streamBackendRocksdb.c b/source/libs/stream/src/streamBackendRocksdb.c index 21b71add82..09f6573052 100644 --- a/source/libs/stream/src/streamBackendRocksdb.c +++ b/source/libs/stream/src/streamBackendRocksdb.c @@ -2538,7 +2538,7 @@ int32_t taskDbOpen(const char* path, const char* key, int64_t chkptId, int64_t* STaskDbWrapper* pTaskDb = taskDbOpenImpl(key, statePath, dbPath); if (pTaskDb != NULL) { int64_t chkpId = -1, ver = -1; - if ((code = chkpLoadExtraInfo(dbPath, &chkpId, &ver) == 0)) { + if ((code = chkpLoadExtraInfo(dbPath, &chkpId, &ver)) == 0) { *processVer = ver; } else { stError("failed to load extra info, path:%s, key:%s, checkpointId: %" PRId64 "reason:%s", path, key, chkptId, @@ -2546,6 +2546,8 @@ int32_t taskDbOpen(const char* path, const char* key, int64_t chkptId, int64_t* taskDbDestroy(pTaskDb, false); return code; } + } else { + code = TSDB_CODE_INVALID_PARA; } taosMemoryFree(dbPath); @@ -4906,7 +4908,7 @@ int32_t bkdMgtCreate(char* path, SBkdMgt** mgt) { if (taosThreadRwlockInit(&p->rwLock, NULL) != 0) { code = TAOS_SYSTEM_ERROR(errno); bkdMgtDestroy(p); - return code; + return code; } *mgt = p;