diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index b518a212a47e3a873a6990537e64ff38fdf07d66..cc3190a1d03f2423790a8de18720280b7f001329 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -454,12 +454,13 @@ int tscSendMsgToServer(SSqlObj *pSql) { }; if(rpcSendRequest(pObj->pRpcObj->pDnodeConn, &pSql->epSet, &rpcMsg, &pSql->rpcRid)) { - if(pSql->cmd.command < TSDB_SQL_HB) + if(pSql->cmd.command == TSDB_SQL_SELECT ) rpcSaveSendInfo(pSql->rpcRid, &pSql->pPrevContext); return TSDB_CODE_SUCCESS; } - return TSDB_CODE_SUCCESS; + tscError("0x%"PRIx64" rpc send data failed. msg=%s", pSql->self, taosMsg[pSql->cmd.msgType]); + return TSDB_CODE_TSC_SEND_DATA_FAILED; } // handle three situation diff --git a/src/inc/taoserror.h b/src/inc/taoserror.h index 2295b88b7b98f55d077ca33e20a1ca3e001233a2..029c63ddcfb54ae2f49dbca28e4c92d8446a033e 100644 --- a/src/inc/taoserror.h +++ b/src/inc/taoserror.h @@ -117,6 +117,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_TSC_RES_TOO_MANY TAOS_DEF_ERROR_CODE(0, 0x0227) //"Result set too large to be output") #define TSDB_CODE_TSC_INVALID_SCHEMA_VERSION TAOS_DEF_ERROR_CODE(0, 0x0228) //"invalid table schema version") #define TSDB_CODE_TSC_TOO_MANY_SML_LINES TAOS_DEF_ERROR_CODE(0, 0x0229) //"too many lines in batch") +#define TSDB_CODE_TSC_SEND_DATA_FAILED TAOS_DEF_ERROR_CODE(0, 0x0230) //"Client send request data error" // mnode #define TSDB_CODE_MND_MSG_NOT_PROCESSED TAOS_DEF_ERROR_CODE(0, 0x0300) //"Message not processed" diff --git a/src/util/src/terror.c b/src/util/src/terror.c index 50e10904b1212328419d74fc65958d3881f30920..6820ff5aefdde4228dc9c431c27a919bf0adc27f 100644 --- a/src/util/src/terror.c +++ b/src/util/src/terror.c @@ -124,6 +124,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_TSC_INVALID_PROTOCOL_TYPE, "Invalid line protocol TAOS_DEFINE_ERROR(TSDB_CODE_TSC_INVALID_PRECISION_TYPE, "Invalid timestamp precision type") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_RES_TOO_MANY, "Result set too large to be output") TAOS_DEFINE_ERROR(TSDB_CODE_TSC_TOO_MANY_SML_LINES, "Too many lines in batch") +TAOS_DEFINE_ERROR(TSDB_CODE_TSC_SEND_DATA_FAILED, "Client send request data failed") // mnode TAOS_DEFINE_ERROR(TSDB_CODE_MND_MSG_NOT_PROCESSED, "Message not processed")