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];
|
SdbEncodeFp encodeFp = pSdb->encodeFps[i];
|
||||||
if (encodeFp == NULL) continue;
|
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];
|
SHashObj *hash = pSdb->hashObjs[i];
|
||||||
TdThreadRwlock *pLock = &pSdb->locks[i];
|
TdThreadRwlock *pLock = &pSdb->locks[i];
|
||||||
|
|
|
@ -83,6 +83,7 @@ const char *sdbStatusName(ESdbStatus status) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void sdbPrintOper(SSdb *pSdb, SSdbRow *pRow, const char *oper) {
|
void sdbPrintOper(SSdb *pSdb, SSdbRow *pRow, const char *oper) {
|
||||||
|
#if 0
|
||||||
EKeyType keyType = pSdb->keyTypes[pRow->type];
|
EKeyType keyType = pSdb->keyTypes[pRow->type];
|
||||||
|
|
||||||
if (keyType == SDB_KEY_BINARY) {
|
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));
|
pRow->refCount, oper, pRow->pObj, sdbStatusName(pRow->status));
|
||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static SHashObj *sdbGetHash(SSdb *pSdb, int32_t type) {
|
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->sver = sver;
|
||||||
pRaw->dataLen = dataLen;
|
pRaw->dataLen = dataLen;
|
||||||
|
|
||||||
|
#if 0
|
||||||
mTrace("raw:%p, is created, len:%d table:%s", pRaw, dataLen, sdbTableName(type));
|
mTrace("raw:%p, is created, len:%d table:%s", pRaw, dataLen, sdbTableName(type));
|
||||||
|
#endif
|
||||||
return pRaw;
|
return pRaw;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sdbFreeRaw(SSdbRaw *pRaw) {
|
void sdbFreeRaw(SSdbRaw *pRaw) {
|
||||||
if (pRaw != NULL) {
|
if (pRaw != NULL) {
|
||||||
|
#if 0
|
||||||
mTrace("raw:%p, is freed", pRaw);
|
mTrace("raw:%p, is freed", pRaw);
|
||||||
|
#endif
|
||||||
taosMemoryFree(pRaw);
|
taosMemoryFree(pRaw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,9 @@ SSdbRow *sdbAllocRow(int32_t objSize) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
mTrace("row:%p, is created, len:%d", pRow->pObj, objSize);
|
mTrace("row:%p, is created, len:%d", pRow->pObj, objSize);
|
||||||
|
#endif
|
||||||
return pRow;
|
return pRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,6 +47,8 @@ void sdbFreeRow(SSdb *pSdb, SSdbRow *pRow, bool callFunc) {
|
||||||
|
|
||||||
sdbPrintOper(pSdb, pRow, "free");
|
sdbPrintOper(pSdb, pRow, "free");
|
||||||
|
|
||||||
|
#if 0
|
||||||
mTrace("row:%p, is freed", pRow->pObj);
|
mTrace("row:%p, is freed", pRow->pObj);
|
||||||
|
#endif
|
||||||
taosMemoryFreeClear(pRow);
|
taosMemoryFreeClear(pRow);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue