refactor: adjust mnode trace log
This commit is contained in:
parent
f30d9a034e
commit
b90f1f246c
|
@ -357,7 +357,7 @@ static int32_t sdbWriteFileImp(SSdb *pSdb) {
|
|||
SdbEncodeFp encodeFp = pSdb->encodeFps[i];
|
||||
if (encodeFp == NULL) continue;
|
||||
|
||||
mTrace("write %s to sdb file, total %d rows", sdbTableName(i), sdbGetSize(pSdb, i));
|
||||
mDebug("write %s to sdb file, total %d rows", sdbTableName(i), sdbGetSize(pSdb, i));
|
||||
|
||||
SHashObj *hash = pSdb->hashObjs[i];
|
||||
TdThreadRwlock *pLock = &pSdb->locks[i];
|
||||
|
|
|
@ -83,6 +83,7 @@ const char *sdbStatusName(ESdbStatus status) {
|
|||
}
|
||||
|
||||
void sdbPrintOper(SSdb *pSdb, SSdbRow *pRow, const char *oper) {
|
||||
#if 0
|
||||
EKeyType keyType = pSdb->keyTypes[pRow->type];
|
||||
|
||||
if (keyType == SDB_KEY_BINARY) {
|
||||
|
@ -96,6 +97,7 @@ void sdbPrintOper(SSdb *pSdb, SSdbRow *pRow, const char *oper) {
|
|||
pRow->refCount, oper, pRow->pObj, sdbStatusName(pRow->status));
|
||||
} else {
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static SHashObj *sdbGetHash(SSdb *pSdb, int32_t type) {
|
||||
|
|
|
@ -37,13 +37,17 @@ SSdbRaw *sdbAllocRaw(ESdbType type, int8_t sver, int32_t dataLen) {
|
|||
pRaw->sver = sver;
|
||||
pRaw->dataLen = dataLen;
|
||||
|
||||
#if 0
|
||||
mTrace("raw:%p, is created, len:%d table:%s", pRaw, dataLen, sdbTableName(type));
|
||||
#endif
|
||||
return pRaw;
|
||||
}
|
||||
|
||||
void sdbFreeRaw(SSdbRaw *pRaw) {
|
||||
if (pRaw != NULL) {
|
||||
#if 0
|
||||
mTrace("raw:%p, is freed", pRaw);
|
||||
#endif
|
||||
taosMemoryFree(pRaw);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,9 @@ SSdbRow *sdbAllocRow(int32_t objSize) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
#if 0
|
||||
mTrace("row:%p, is created, len:%d", pRow->pObj, objSize);
|
||||
#endif
|
||||
return pRow;
|
||||
}
|
||||
|
||||
|
@ -45,6 +47,8 @@ void sdbFreeRow(SSdb *pSdb, SSdbRow *pRow, bool callFunc) {
|
|||
|
||||
sdbPrintOper(pSdb, pRow, "free");
|
||||
|
||||
#if 0
|
||||
mTrace("row:%p, is freed", pRow->pObj);
|
||||
#endif
|
||||
taosMemoryFreeClear(pRow);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue