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); static int32_t sdbCreateDir(SSdb *pSdb);
SSdb *sdbInit(SSdbOpt *pOption) { 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)); SSdb *pSdb = taosMemoryCalloc(1, sizeof(SSdb));
if (pSdb == NULL) { if (pSdb == NULL) {
@ -175,7 +175,7 @@ void sdbGetCommitInfo(SSdb *pSdb, int64_t *index, int64_t *term, int64_t *config
*index = pSdb->commitIndex; *index = pSdb->commitIndex;
*term = pSdb->commitTerm; *term = pSdb->commitTerm;
*config = pSdb->commitConfig; *config = pSdb->commitConfig;
#if 0 #if 1
mTrace("mnode current info, apply index:%" PRId64 " term:%" PRId64 " config:%" PRId64 ", commit index:%" PRId64 mTrace("mnode current info, apply index:%" PRId64 " term:%" PRId64 " config:%" PRId64 ", commit index:%" PRId64
" term:%" PRId64 " config:%" PRId64, " term:%" PRId64 " config:%" PRId64,
pSdb->applyIndex, pSdb->applyTerm, pSdb->applyConfig, *index, *term, *config); 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) { void sdbPrintOper(SSdb *pSdb, SSdbRow *pRow, const char *oper) {
#if 0 #if 1
EKeyType keyType = pSdb->keyTypes[pRow->type]; EKeyType keyType = pSdb->keyTypes[pRow->type];
if (keyType == SDB_KEY_BINARY) { 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->sver = sver;
pRaw->dataLen = dataLen; pRaw->dataLen = dataLen;
#if 0 #if 1
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 #endif
return pRaw; return pRaw;
@ -45,7 +45,7 @@ SSdbRaw *sdbAllocRaw(ESdbType type, int8_t sver, int32_t dataLen) {
void sdbFreeRaw(SSdbRaw *pRaw) { void sdbFreeRaw(SSdbRaw *pRaw) {
if (pRaw != NULL) { if (pRaw != NULL) {
#if 0 #if 1
mTrace("raw:%p, is freed", pRaw); mTrace("raw:%p, is freed", pRaw);
#endif #endif
taosMemoryFree(pRaw); taosMemoryFree(pRaw);

View File

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