提交 6f5d9065 编写于 作者: L Liu Jicong

fix(wal): add debug log

上级 dd5b2b73
...@@ -324,12 +324,17 @@ int32_t walEndSnapshot(SWal *pWal) { ...@@ -324,12 +324,17 @@ int32_t walEndSnapshot(SWal *pWal) {
// find files safe to delete // find files safe to delete
SWalFileInfo *pInfo = taosArraySearch(pWal->fileInfoSet, &tmp, compareWalFileInfo, TD_LE); SWalFileInfo *pInfo = taosArraySearch(pWal->fileInfoSet, &tmp, compareWalFileInfo, TD_LE);
if (pInfo) { if (pInfo) {
SWalFileInfo *pLastFileInfo = taosArrayGetLast(pWal->fileInfoSet);
wDebug("vgId:%d, wal search found file info: first:%" PRId64 "last:%" PRId64, pWal->cfg.vgId, pInfo->firstVer,
pInfo->lastVer);
if (ver >= pInfo->lastVer) { if (ver >= pInfo->lastVer) {
//pInfo--;
pInfo++; pInfo++;
wDebug("vgId:%d, wal remove advance one file: first:%" PRId64 "last:%" PRId64, pWal->cfg.vgId, pInfo->firstVer,
pInfo->lastVer);
} }
if (POINTER_DISTANCE(pInfo, pWal->fileInfoSet->pData) > 0) { if (pInfo <= pLastFileInfo) {
wDebug("vgId:%d, wal end remove for %" PRId64, pWal->cfg.vgId, pInfo->firstVer); wDebug("vgId:%d, wal end remove for first:%" PRId64 "last:%" PRId64, pWal->cfg.vgId, pInfo->firstVer,
pInfo->lastVer);
} else { } else {
wDebug("vgId:%d, wal no remove", pWal->cfg.vgId); wDebug("vgId:%d, wal no remove", pWal->cfg.vgId);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册