fix: response TSDB_CODE_VND_NOT_SYNCED while not pVnode->inUse in vnodeProcessWriteMsg

This commit is contained in:
Benguang Zhao 2022-10-12 20:48:23 +08:00
parent 6f39a36344
commit 12d870ef3b
1 changed files with 6 additions and 0 deletions

View File

@ -145,6 +145,12 @@ int32_t vnodeProcessWriteMsg(SVnode *pVnode, SRpcMsg *pMsg, int64_t version, SRp
int32_t len;
int32_t ret;
if (!pVnode->inUse) {
terrno = TSDB_CODE_VND_NOT_SYNCED;
vError("vgId:%d, not ready to write since %s", TD_VID(pVnode), terrstr());
return -1;
}
vDebug("vgId:%d, start to process write request %s, index:%" PRId64, TD_VID(pVnode), TMSG_INFO(pMsg->msgType),
version);