fix: error msg incorrect when no enough memory to create vnode

This commit is contained in:
Shengliang Guan 2022-05-13 17:40:22 +08:00
parent 2178eabcd8
commit 558d50fef2
1 changed files with 3 additions and 3 deletions

View File

@ -137,21 +137,21 @@ SVnode *vnodeOpen(const char *path, STfs *pTfs, SMsgCb msgCb) {
// open query
if (vnodeQueryOpen(pVnode)) {
vError("vgId:%d failed to open vnode query since %s", TD_VID(pVnode), tstrerror(terrno));
terrno = TAOS_SYSTEM_ERROR(errno);
terrno = TSDB_CODE_OUT_OF_MEMORY;
goto _err;
}
// vnode begin
if (vnodeBegin(pVnode) < 0) {
vError("vgId:%d failed to begin since %s", TD_VID(pVnode), tstrerror(terrno));
terrno = TAOS_SYSTEM_ERROR(errno);
terrno = TSDB_CODE_OUT_OF_MEMORY;
goto _err;
}
// open sync
if (vnodeSyncOpen(pVnode, dir)) {
vError("vgId:%d failed to open sync since %s", TD_VID(pVnode), tstrerror(terrno));
terrno = TAOS_SYSTEM_ERROR(errno);
terrno = TSDB_CODE_OUT_OF_MEMORY;
goto _err;
}