feat(rpc): move the check msgType to cliet

This commit is contained in:
Alex Duan 2022-12-21 12:44:29 +08:00
parent 5ca52595ae
commit ced76efde0
1 changed files with 5 additions and 4 deletions

View File

@ -1424,11 +1424,12 @@ void processMsgFromServer(void* parent, SRpcMsg* pMsg, SEpSet* pEpSet) {
memcpy((void*)tEpSet, (void*)pEpSet, sizeof(SEpSet));
}
// pMsg is response msg
switch (pMsg->msgType) {
case TDMT_VND_BATCH_META:
case TDMT_VND_SUBMIT:
case TDMT_SCH_QUERY:
case TDMT_SCH_MERGE_QUERY:
case TDMT_VND_BATCH_META + 1:
case TDMT_VND_SUBMIT + 1:
case TDMT_SCH_QUERY + 1:
case TDMT_SCH_MERGE_QUERY + 1:
// uniform to one error code: TSDB_CODE_RPC_VGROUP_NOT_CONNECTED
if (pMsg->code == TSDB_CODE_RPC_VGROUP_BROKEN_LINK) {
pMsg->code = TSDB_CODE_RPC_VGROUP_NOT_CONNECTED;