diff --git a/src/client/src/tscAsync.c b/src/client/src/tscAsync.c index df1b98478c2244b15b0170e310565d8a6cddc314..3edebd88ec585b766d5a88b3fa3228f2f8148248 100644 --- a/src/client/src/tscAsync.c +++ b/src/client/src/tscAsync.c @@ -313,7 +313,7 @@ static void tscAsyncResultCallback(SSchedMsg *pMsg) { } assert(pSql->res.code != TSDB_CODE_SUCCESS); - if (tsShortcutFlag) { + if (tsShortcutFlag && (pSql->res.code == TSDB_CODE_RPC_SHORTCUT)) { tscDebug("0x%" PRIx64 " async result callback, code:%s", pSql->self, tstrerror(pSql->res.code)); pSql->res.code = TSDB_CODE_SUCCESS; } else { diff --git a/src/client/src/tscServer.c b/src/client/src/tscServer.c index c952bc2eb3e4594189fbb0b4b276ec586f1f7115..3f0a261a25958c5c4f5a9afe8d0f5c54c161347f 100644 --- a/src/client/src/tscServer.c +++ b/src/client/src/tscServer.c @@ -335,7 +335,7 @@ int tscSendMsgToServer(SSqlObj *pSql) { if ((rpcMsg.msgType == TSDB_MSG_TYPE_SUBMIT) && (tsShortcutFlag & TSDB_SHORTCUT_RB_RPC_SEND_SUBMIT)) { rpcFreeCont(rpcMsg.pCont); - return TSDB_CODE_FAILED; + return TSDB_CODE_RPC_SHORTCUT; } rpcSendRequest(pObj->pRpcObj->pDnodeConn, &pSql->epSet, &rpcMsg, &pSql->rpcRid); diff --git a/src/inc/taoserror.h b/src/inc/taoserror.h index 029d3bd40fdd216e239feee0594d2491ef4aefdf..9f51952d28abb4dc5b589126b6a6358af604de8b 100644 --- a/src/inc/taoserror.h +++ b/src/inc/taoserror.h @@ -60,6 +60,7 @@ int32_t* taosGetErrno(); #define TSDB_CODE_APP_NOT_READY TAOS_DEF_ERROR_CODE(0, 0x0014) //"Database not ready" #define TSDB_CODE_RPC_FQDN_ERROR TAOS_DEF_ERROR_CODE(0, 0x0015) //"Unable to resolve FQDN" #define TSDB_CODE_RPC_INVALID_VERSION TAOS_DEF_ERROR_CODE(0, 0x0016) //"Invalid app version" +#define TSDB_CODE_RPC_SHORTCUT TAOS_DEF_ERROR_CODE(0, 0x0017) //"Shortcut" //common & util #define TSDB_CODE_COM_OPS_NOT_SUPPORT TAOS_DEF_ERROR_CODE(0, 0x0100) //"Operation not supported" diff --git a/src/util/src/terror.c b/src/util/src/terror.c index 0cc345d60a0d0436ce72ed29a41571db7b3e8fc4..640e842de340b686fcd1bd9bd10ad0850c9d02a1 100644 --- a/src/util/src/terror.c +++ b/src/util/src/terror.c @@ -68,6 +68,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_RPC_INVALID_TIME_STAMP, "Client and server's t TAOS_DEFINE_ERROR(TSDB_CODE_APP_NOT_READY, "Database not ready") TAOS_DEFINE_ERROR(TSDB_CODE_RPC_FQDN_ERROR, "Unable to resolve FQDN") TAOS_DEFINE_ERROR(TSDB_CODE_RPC_INVALID_VERSION, "Invalid app version") +TAOS_DEFINE_ERROR(TSDB_CODE_RPC_SHORTCUT, "Shortcut") //common & util TAOS_DEFINE_ERROR(TSDB_CODE_COM_OPS_NOT_SUPPORT, "Operation not supported")