enh: remove unused code in vmProcessCreateVnodeReq
This commit is contained in:
parent
05e8af4837
commit
b7e134af20
|
@ -265,22 +265,6 @@ int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
|
||||||
|
|
||||||
snprintf(path, TSDB_FILENAME_LEN, "vnode%svnode%d", TD_DIRSEP, vnodeCfg.vgId);
|
snprintf(path, TSDB_FILENAME_LEN, "vnode%svnode%d", TD_DIRSEP, vnodeCfg.vgId);
|
||||||
|
|
||||||
#if 0
|
|
||||||
if (pMgmt->pTfs) {
|
|
||||||
if (tfsDirExistAt(pMgmt->pTfs, path, (SDiskID){0})) {
|
|
||||||
terrno = TSDB_CODE_VND_DIR_ALREADY_EXIST;
|
|
||||||
dError("vgId:%d, failed to restore vnode since %s", req.vgId, terrstr());
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (taosDirExist(path)) {
|
|
||||||
terrno = TSDB_CODE_VND_DIR_ALREADY_EXIST;
|
|
||||||
dError("vgId:%d, failed to restore vnode since %s", req.vgId, terrstr());
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (vnodeCreate(path, &vnodeCfg, pMgmt->pTfs) < 0) {
|
if (vnodeCreate(path, &vnodeCfg, pMgmt->pTfs) < 0) {
|
||||||
tFreeSCreateVnodeReq(&req);
|
tFreeSCreateVnodeReq(&req);
|
||||||
dError("vgId:%d, failed to create vnode since %s", req.vgId, terrstr());
|
dError("vgId:%d, failed to create vnode since %s", req.vgId, terrstr());
|
||||||
|
|
Loading…
Reference in New Issue