Merge pull request #21718 from taosdata/FIX/TD-24549-3.0
fix: make vmProcessCreateVnodeReq idempotent
This commit is contained in:
commit
74411a4858
|
@ -265,6 +265,7 @@ 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 (pMgmt->pTfs) {
|
||||||
if (tfsDirExistAt(pMgmt->pTfs, path, (SDiskID){0})) {
|
if (tfsDirExistAt(pMgmt->pTfs, path, (SDiskID){0})) {
|
||||||
terrno = TSDB_CODE_VND_DIR_ALREADY_EXIST;
|
terrno = TSDB_CODE_VND_DIR_ALREADY_EXIST;
|
||||||
|
@ -278,6 +279,7 @@ int32_t vmProcessCreateVnodeReq(SVnodeMgmt *pMgmt, SRpcMsg *pMsg) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (vnodeCreate(path, &vnodeCfg, pMgmt->pTfs) < 0) {
|
if (vnodeCreate(path, &vnodeCfg, pMgmt->pTfs) < 0) {
|
||||||
tFreeSCreateVnodeReq(&req);
|
tFreeSCreateVnodeReq(&req);
|
||||||
|
|
Loading…
Reference in New Issue