提交 6f94281a 编写于 作者: wmmhello's avatar wmmhello

fix:add log for wal

上级 594d68b8
......@@ -149,6 +149,8 @@ typedef struct SWalReader {
int64_t capacity;
// int8_t curInvalid;
// int8_t curStopped;
int64_t bodyCnt;
int64_t bodyTotalSize;
TdThreadMutex mutex;
SWalFilterCond cond;
// TODO remove it
......
......@@ -262,8 +262,8 @@ static int32_t walFetchBodyNew(SWalReader *pReader) {
SWalCont *pReadHead = &pReader->pHead->head;
int64_t ver = pReadHead->version;
wDebug("vgId:%d, wal starts to fetch body, ver:%" PRId64 " ,len:%d", pReader->pWal->cfg.vgId, ver,
pReadHead->bodyLen);
wInfo("vgId:%d, wal starts to fetch body, ver:%" PRId64 " ,len:%d, total cnt:%"PRId64 ", total size:%"PRId64, pReader->pWal->cfg.vgId, ver,
pReadHead->bodyLen, pReader->bodyCnt, pReader->bodyTotalSize);
if (pReader->capacity < pReadHead->bodyLen) {
SWalCkHead *ptr = (SWalCkHead *)taosMemoryRealloc(pReader->pHead, sizeof(SWalCkHead) + pReadHead->bodyLen);
......@@ -300,6 +300,8 @@ static int32_t walFetchBodyNew(SWalReader *pReader) {
wDebug("vgId:%d, index:%" PRId64 " is fetched, cursor advance", pReader->pWal->cfg.vgId, ver);
pReader->curVersion = ver + 1;
pReader->bodyCnt++;
pReader->bodyTotalSize += pReadHead->bodyLen;
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册