未验证 提交 2ed91506 编写于 作者: S slguan 提交者: GitHub

Merge pull request #726 from taosdata/feature/liaohj

[tbase-1147]
...@@ -224,7 +224,7 @@ void tscGetConnToVnode(SSqlObj *pSql, uint8_t *pCode) { ...@@ -224,7 +224,7 @@ void tscGetConnToVnode(SSqlObj *pSql, uint8_t *pCode) {
(pSql->index) = (pSql->index + 1) % TSDB_VNODES_SUPPORT; (pSql->index) = (pSql->index + 1) % TSDB_VNODES_SUPPORT;
continue; continue;
} }
*pCode = 0; *pCode = TSDB_CODE_SUCCESS;
void *thandle = void *thandle =
taosGetConnFromCache(tscConnCache, pVPeersDesc[pSql->index].ip, pVPeersDesc[pSql->index].vnode, pTscObj->user); taosGetConnFromCache(tscConnCache, pVPeersDesc[pSql->index].ip, pVPeersDesc[pSql->index].vnode, pTscObj->user);
...@@ -250,7 +250,7 @@ void tscGetConnToVnode(SSqlObj *pSql, uint8_t *pCode) { ...@@ -250,7 +250,7 @@ void tscGetConnToVnode(SSqlObj *pSql, uint8_t *pCode) {
pSql->thandle = thandle; pSql->thandle = thandle;
pSql->ip = pVPeersDesc[pSql->index].ip; pSql->ip = pVPeersDesc[pSql->index].ip;
pSql->vnode = pVPeersDesc[pSql->index].vnode; pSql->vnode = pVPeersDesc[pSql->index].vnode;
tscTrace("%p vnode:%d ip:0x%x index:%d is picked up, pConn:%p", pSql, pVPeersDesc[pSql->index].vnode, tscTrace("%p vnode:%d ip:%p index:%d is picked up, pConn:%p", pSql, pVPeersDesc[pSql->index].vnode,
pVPeersDesc[pSql->index].ip, pSql->index, pSql->thandle); pVPeersDesc[pSql->index].ip, pSql->index, pSql->thandle);
#else #else
*pCode = 0; *pCode = 0;
...@@ -283,7 +283,11 @@ void tscGetConnToVnode(SSqlObj *pSql, uint8_t *pCode) { ...@@ -283,7 +283,11 @@ void tscGetConnToVnode(SSqlObj *pSql, uint8_t *pCode) {
// the pSql->res.code is the previous error code. // the pSql->res.code is the previous error code.
if (pSql->thandle == NULL && pSql->retry >= pSql->maxRetry) { if (pSql->thandle == NULL && pSql->retry >= pSql->maxRetry) {
*pCode = pSql->res.code; if (pSql->res.code != TSDB_CODE_SUCCESS) {
*pCode = pSql->res.code;
}
tscError("%p reach the max retry:%d, code:%d", pSql, pSql->retry, *pCode);
} }
} }
...@@ -400,7 +404,6 @@ void *tscProcessMsgFromServer(char *msg, void *ahandle, void *thandle) { ...@@ -400,7 +404,6 @@ void *tscProcessMsgFromServer(char *msg, void *ahandle, void *thandle) {
// for single node situation, do NOT try next index // for single node situation, do NOT try next index
#endif #endif
pSql->thandle = NULL; pSql->thandle = NULL;
// todo taos_stop_query() in async model // todo taos_stop_query() in async model
/* /*
* in case of * in case of
......
...@@ -103,7 +103,7 @@ int mgmtProcessVpeerCfgMsg(char *cont, int contLen, SDnodeObj *pObj) { ...@@ -103,7 +103,7 @@ int mgmtProcessVpeerCfgMsg(char *cont, int contLen, SDnodeObj *pObj) {
mTrace("dnode:%s, vnode:%d, vgroup:%d, send create meter msg, code:%d", taosIpStr(pObj->privateIp), vnode, pVgroup->vgId, *pMsg); mTrace("dnode:%s, vnode:%d, vgroup:%d, send create meter msg, code:%d", taosIpStr(pObj->privateIp), vnode, pVgroup->vgId, *pMsg);
} else { } else {
mTrace("dnode:%s, vnode:%d, no vgroup info, vgroup:%d", taosIpStr(pObj->privateIp), vnode, pObj->vload[vnode].vgId); mTrace("dnode:%s, vnode:%d, no vgroup info, vgroup:%d", taosIpStr(pObj->privateIp), vnode, pObj->vload[vnode].vgId);
*pMsg = TSDB_CODE_INVALID_VALUE; *pMsg = TSDB_CODE_NOT_ACTIVE_VNODE;
pMsg++; pMsg++;
*(int32_t *)pMsg = htonl(vnode); *(int32_t *)pMsg = htonl(vnode);
pMsg += sizeof(int32_t); pMsg += sizeof(int32_t);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册