modify log level while walLoadMeta failed
This commit is contained in:
parent
3310e81456
commit
f206837d48
|
@ -91,7 +91,8 @@ static int32_t walInitLock(SWal *pWal) {
|
||||||
}
|
}
|
||||||
|
|
||||||
SWal *walOpen(const char *path, SWalCfg *pCfg) {
|
SWal *walOpen(const char *path, SWalCfg *pCfg) {
|
||||||
SWal *pWal = taosMemoryCalloc(1, sizeof(SWal));
|
int32_t code = 0;
|
||||||
|
SWal *pWal = taosMemoryCalloc(1, sizeof(SWal));
|
||||||
if (pWal == NULL) {
|
if (pWal == NULL) {
|
||||||
terrno = TAOS_SYSTEM_ERROR(errno);
|
terrno = TAOS_SYSTEM_ERROR(errno);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -160,17 +161,20 @@ SWal *walOpen(const char *path, SWalCfg *pCfg) {
|
||||||
pWal->writeHead.magic = WAL_MAGIC;
|
pWal->writeHead.magic = WAL_MAGIC;
|
||||||
|
|
||||||
// load meta
|
// load meta
|
||||||
if (walLoadMeta(pWal) < 0) {
|
code = walLoadMeta(pWal);
|
||||||
wInfo("vgId:%d, failed to load meta since %s", pWal->cfg.vgId, tstrerror(terrno));
|
if (code < 0) {
|
||||||
|
wWarn("vgId:%d, failed to load meta since %s", pWal->cfg.vgId, tstrerror(code));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (walCheckAndRepairMeta(pWal) < 0) {
|
code = walCheckAndRepairMeta(pWal);
|
||||||
wError("vgId:%d, cannot open wal since repair meta file failed", pWal->cfg.vgId);
|
if (code < 0) {
|
||||||
|
wError("vgId:%d, cannot open wal since repair meta file failed since %s", pWal->cfg.vgId, tstrerror(code));
|
||||||
goto _err;
|
goto _err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (walCheckAndRepairIdx(pWal) < 0) {
|
code = walCheckAndRepairIdx(pWal);
|
||||||
wError("vgId:%d, cannot open wal since repair idx file failed", pWal->cfg.vgId);
|
if (code < 0) {
|
||||||
|
wError("vgId:%d, cannot open wal since repair idx file failed since %s", pWal->cfg.vgId, tstrerror(code));
|
||||||
goto _err;
|
goto _err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue