refactor: adjust some logs
This commit is contained in:
parent
326714a077
commit
24a6b352ef
|
@ -34,7 +34,7 @@ void mndSyncCommitMsg(struct SSyncFSM *pFsm, const SRpcMsg *pMsg, SFsmCbMeta cbM
|
|||
|
||||
int32_t transId = sdbGetIdFromRaw(pMnode->pSdb, pRaw);
|
||||
pMgmt->errCode = cbMeta.code;
|
||||
mTrace("trans:%d, is proposed, savedTransId:%d code:0x%x, ver:%" PRId64 " term:%" PRId64 " role:%s raw:%p", transId,
|
||||
mDebug("trans:%d, is proposed, saved:%d code:0x%x, index:%" PRId64 " term:%" PRId64 " role:%s raw:%p", transId,
|
||||
pMgmt->transId, cbMeta.code, cbMeta.index, cbMeta.term, syncStr(cbMeta.state), pRaw);
|
||||
|
||||
if (pMgmt->errCode == 0) {
|
||||
|
@ -78,7 +78,7 @@ void mndReConfig(struct SSyncFSM *pFsm, SSyncCfg newCfg, SReConfigCbMeta cbMeta)
|
|||
SSyncMgmt *pMgmt = &pMnode->syncMgmt;
|
||||
|
||||
pMgmt->errCode = cbMeta.code;
|
||||
mInfo("trans:-1, sync reconfig is proposed, savedTransId:%d code:0x%x, curTerm:%" PRId64 " term:%" PRId64,
|
||||
mInfo("trans:-1, sync reconfig is proposed, saved:%d code:0x%x, index:%" PRId64 " term:%" PRId64,
|
||||
pMgmt->transId, cbMeta.code, cbMeta.index, cbMeta.term);
|
||||
|
||||
if (pMgmt->transId == -1) {
|
||||
|
|
|
@ -496,6 +496,8 @@ int32_t sdbStartRead(SSdb *pSdb, SSdbIter **ppIter) {
|
|||
snprintf(datafile, sizeof(datafile), "%s%ssdb.data", pSdb->currDir, TD_DIRSEP);
|
||||
|
||||
taosThreadMutexLock(&pSdb->filelock);
|
||||
int64_t commitIndex = pSdb->lastCommitVer;
|
||||
int64_t commitTerm = pSdb->lastCommitTerm;
|
||||
if (taosCopyFile(datafile, pIter->name) < 0) {
|
||||
taosThreadMutexUnlock(&pSdb->filelock);
|
||||
terrno = TAOS_SYSTEM_ERROR(errno);
|
||||
|
@ -514,7 +516,8 @@ int32_t sdbStartRead(SSdb *pSdb, SSdbIter **ppIter) {
|
|||
}
|
||||
|
||||
*ppIter = pIter;
|
||||
mInfo("sdbiter:%p, is created to read snapshot, file:%s", pIter, pIter->name);
|
||||
mInfo("sdbiter:%p, is created to read snapshot, index:%" PRId64 " term:%" PRId64 " file:%s", pIter, commitIndex,
|
||||
commitTerm, pIter->name);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue