fix: add more trace log for mnode

This commit is contained in:
Shengliang Guan 2022-09-23 13:23:48 +08:00
parent 479218fb18
commit fae0ad1bfa
4 changed files with 7 additions and 7 deletions

View File

@ -19,7 +19,7 @@
static int32_t sdbCreateDir(SSdb *pSdb);
SSdb *sdbInit(SSdbOpt *pOption) {
mDebug("start to init sdb in %s", pOption->path);
mInfo("start to init sdb in %s", pOption->path);
SSdb *pSdb = taosMemoryCalloc(1, sizeof(SSdb));
if (pSdb == NULL) {
@ -175,7 +175,7 @@ void sdbGetCommitInfo(SSdb *pSdb, int64_t *index, int64_t *term, int64_t *config
*index = pSdb->commitIndex;
*term = pSdb->commitTerm;
*config = pSdb->commitConfig;
#if 0
#if 1
mTrace("mnode current info, apply index:%" PRId64 " term:%" PRId64 " config:%" PRId64 ", commit index:%" PRId64
" term:%" PRId64 " config:%" PRId64,
pSdb->applyIndex, pSdb->applyTerm, pSdb->applyConfig, *index, *term, *config);

View File

@ -83,7 +83,7 @@ const char *sdbStatusName(ESdbStatus status) {
}
void sdbPrintOper(SSdb *pSdb, SSdbRow *pRow, const char *oper) {
#if 0
#if 1
EKeyType keyType = pSdb->keyTypes[pRow->type];
if (keyType == SDB_KEY_BINARY) {

View File

@ -37,7 +37,7 @@ SSdbRaw *sdbAllocRaw(ESdbType type, int8_t sver, int32_t dataLen) {
pRaw->sver = sver;
pRaw->dataLen = dataLen;
#if 0
#if 1
mTrace("raw:%p, is created, len:%d table:%s", pRaw, dataLen, sdbTableName(type));
#endif
return pRaw;
@ -45,7 +45,7 @@ SSdbRaw *sdbAllocRaw(ESdbType type, int8_t sver, int32_t dataLen) {
void sdbFreeRaw(SSdbRaw *pRaw) {
if (pRaw != NULL) {
#if 0
#if 1
mTrace("raw:%p, is freed", pRaw);
#endif
taosMemoryFree(pRaw);

View File

@ -23,7 +23,7 @@ SSdbRow *sdbAllocRow(int32_t objSize) {
return NULL;
}
#if 0
#if 1
mTrace("row:%p, is created, len:%d", pRow->pObj, objSize);
#endif
return pRow;
@ -47,7 +47,7 @@ void sdbFreeRow(SSdb *pSdb, SSdbRow *pRow, bool callFunc) {
sdbPrintOper(pSdb, pRow, "free");
#if 0
#if 1
mTrace("row:%p, is freed", pRow->pObj);
#endif
taosMemoryFreeClear(pRow);