未验证 提交 c8fff945 编写于 作者: H haojun Liao 提交者: GitHub

Merge pull request #954 from taosdata/feature/#928

Data write request is not redirected in multiple copies, causing slow write speed
......@@ -469,6 +469,9 @@ void *tscProcessMsgFromServer(char *msg, void *ahandle, void *thandle) {
if (pCmd->command > TSDB_SQL_MGMT) {
tscProcessMgmtRedirect(pSql, pMsg->content + 1);
} else if (pCmd->command == TSDB_SQL_INSERT){
pSql->index++;
pSql->maxRetry = TSDB_VNODES_SUPPORT * 2;
} else {
pSql->index++;
}
......
......@@ -118,6 +118,9 @@ void *vnodeProcessMsgFromShell(char *msg, void *ahandle, void *thandle) {
} else if (pMsg->msgType == TSDB_MSG_TYPE_SUBMIT) {
if (vnodeList[vnode].vnodeStatus == TSDB_VN_STATUS_MASTER) {
vnodeProcessShellSubmitRequest((char *) pMsg->content, pMsg->msgLen - sizeof(SIntMsg), pObj);
} else if (vnodeList[vnode].vnodeStatus == TSDB_VN_STATUS_SLAVE) {
taosSendSimpleRsp(thandle, pMsg->msgType + 1, TSDB_CODE_REDIRECT);
dTrace("vid:%d sid:%d, shell submit msg is redirect since in status:%s", vnode, sid, taosGetVnodeStatusStr(vnodeList[vnode].vnodeStatus));
} else {
taosSendSimpleRsp(thandle, pMsg->msgType + 1, TSDB_CODE_NOT_READY);
dTrace("vid:%d sid:%d, shell submit msg is ignored since in status:%s", vnode, sid, taosGetVnodeStatusStr(vnodeList[vnode].vnodeStatus));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册