commit
290e3cb5f2
|
@ -310,6 +310,8 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) {
|
|||
pVnode->version = walGetVersion(pVnode->wal);
|
||||
}
|
||||
|
||||
walRenew(pVnode->wal);
|
||||
|
||||
SSyncInfo syncInfo;
|
||||
syncInfo.vgId = pVnode->vgId;
|
||||
syncInfo.version = pVnode->version;
|
||||
|
|
|
@ -145,18 +145,7 @@ static int32_t walInitObj(SWal *pWal) {
|
|||
return TAOS_SYSTEM_ERROR(errno);
|
||||
}
|
||||
|
||||
if (pWal->keep) {
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
walRenew(pWal);
|
||||
|
||||
if (pWal && pWal->fd < 0) {
|
||||
wError("vgId:%d, file:%s, failed to open file since %s", pWal->vgId, pWal->path, strerror(errno));
|
||||
return TAOS_SYSTEM_ERROR(errno);
|
||||
}
|
||||
|
||||
wDebug("vgId:%d, file is initialized", pWal->vgId);
|
||||
wDebug("vgId:%d, object is initialized", pWal->vgId);
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -80,6 +80,7 @@ int32_t walWrite(void *handle, SWalHead *pHead) {
|
|||
int32_t code = 0;
|
||||
|
||||
// no wal
|
||||
if (pWal->fd <= 0) return 0;
|
||||
if (pWal->level == TAOS_WAL_NOLOG) return 0;
|
||||
if (pHead->version <= pWal->version) return 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue