提交 13852f56 编写于 作者: D dapan1121

fix: compile issue

上级 7d7a0769
......@@ -716,7 +716,7 @@ int32_t ctgReadDBCfgFromCache(SCatalog *pCtg, const char* dbFName, SDbCfgInfo* p
if (NULL == dbCache) {
ctgDebug("db %s not in cache", dbFName);
pDbCfg->cfgVersion = -1;
CTG_CACHE_STAT_INC(numOfCfgMiss, 1);
CTG_CACHE_NHIT_INC(CTG_CI_DB_CFG, 1);
return TSDB_CODE_SUCCESS;
}
......@@ -730,10 +730,10 @@ int32_t ctgReadDBCfgFromCache(SCatalog *pCtg, const char* dbFName, SDbCfgInfo* p
memcpy(pDbCfg, pInfo, sizeof(*pInfo));
taosMemoryFree(pInfo);
CTG_CACHE_STAT_INC(numOfCfgHit, 1);
CTG_CACHE_HIT_INC(CTG_CI_DB_CFG, 1);
} else {
pDbCfg->cfgVersion = -1;
CTG_CACHE_STAT_INC(numOfCfgMiss, 1);
CTG_CACHE_NHIT_INC(CTG_CI_DB_CFG, 1);
}
_return:
......
......@@ -50,7 +50,6 @@ typedef struct {
int32_t stop;
TdThread asyncThread;
TdThreadMutex buffMutex;
SRWLatch buffLock;
} SLogBuff;
typedef struct {
......@@ -569,7 +568,7 @@ static SLogBuff *taosLogBuffNew(int32_t bufSize) {
pLogBuf->minBuffSize = bufSize / 10;
pLogBuf->stop = 0;
//if (taosThreadMutexInit(&LOG_BUF_MUTEX(pLogBuf), NULL) < 0) goto _err;
if (taosThreadMutexInit(&LOG_BUF_MUTEX(pLogBuf), NULL) < 0) goto _err;
// tsem_init(&(pLogBuf->buffNotEmpty), 0, 0);
return pLogBuf;
......@@ -604,8 +603,7 @@ static int32_t taosPushLogBuffer(SLogBuff *pLogBuf, const char *msg, int32_t msg
if (pLogBuf == NULL || pLogBuf->stop) return -1;
//taosThreadMutexLock(&LOG_BUF_MUTEX(pLogBuf));
taosWLockLatch(&pLogBuf->buffLock);
taosThreadMutexLock(&LOG_BUF_MUTEX(pLogBuf));
start = LOG_BUF_START(pLogBuf);
end = LOG_BUF_END(pLogBuf);
......@@ -619,8 +617,7 @@ static int32_t taosPushLogBuffer(SLogBuff *pLogBuf, const char *msg, int32_t msg
if (remainSize <= msgLen || ((lostLine > 0) && (remainSize <= (msgLen + tmpBufLen)))) {
lostLine++;
tsAsyncLogLostLines++;
//taosThreadMutexUnlock(&LOG_BUF_MUTEX(pLogBuf));
taosWUnLockLatch(&pLogBuf->buffLock);
taosThreadMutexUnlock(&LOG_BUF_MUTEX(pLogBuf));
return -1;
}
......@@ -641,8 +638,7 @@ static int32_t taosPushLogBuffer(SLogBuff *pLogBuf, const char *msg, int32_t msg
}
*/
//taosThreadMutexUnlock(&LOG_BUF_MUTEX(pLogBuf));
taosWUnLockLatch(&pLogBuf->buffLock);
taosThreadMutexUnlock(&LOG_BUF_MUTEX(pLogBuf));
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册