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

fix: compile issue

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