提交 a9ad5678 编写于 作者: 陶建辉(Jeff)'s avatar 陶建辉(Jeff)

fix issue #418

上级 36d85a60
...@@ -118,6 +118,7 @@ typedef struct rpc_server { ...@@ -118,6 +118,7 @@ typedef struct rpc_server {
int taosDebugFlag = 131; int taosDebugFlag = 131;
int tsRpcTimer = 300; int tsRpcTimer = 300;
int tsRpcMaxTime = 600; // seconds; int tsRpcMaxTime = 600; // seconds;
int tsRpcProgressTime = 10; // milliseocnds
// not configurable // not configurable
int tsRpcMaxRetry; int tsRpcMaxRetry;
...@@ -294,7 +295,7 @@ int taosSendQuickRsp(void *thandle, char rsptype, char code) { ...@@ -294,7 +295,7 @@ int taosSendQuickRsp(void *thandle, char rsptype, char code) {
void *taosOpenRpc(SRpcInit *pRpc) { void *taosOpenRpc(SRpcInit *pRpc) {
STaosRpc *pServer; STaosRpc *pServer;
tsRpcMaxRetry = tsRpcMaxTime * 1000 / tsRpcTimer; tsRpcMaxRetry = tsRpcMaxTime * 1000 / tsRpcProgressTime;
tsRpcHeadSize = sizeof(STaosHeader) + sizeof(SMsgNode); tsRpcHeadSize = sizeof(STaosHeader) + sizeof(SMsgNode);
pServer = (STaosRpc *)malloc(sizeof(STaosRpc)); pServer = (STaosRpc *)malloc(sizeof(STaosRpc));
...@@ -896,7 +897,7 @@ int taosProcessMsgHeader(STaosHeader *pHeader, SRpcConn **ppConn, STaosRpc *pSer ...@@ -896,7 +897,7 @@ int taosProcessMsgHeader(STaosHeader *pHeader, SRpcConn **ppConn, STaosRpc *pSer
tTrace("%s cid:%d sid:%d id:%s, peer is still processing the transaction, pConn:%p", tTrace("%s cid:%d sid:%d id:%s, peer is still processing the transaction, pConn:%p",
pServer->label, chann, sid, pHeader->meterId, pConn); pServer->label, chann, sid, pHeader->meterId, pConn);
pConn->tretry++; pConn->tretry++;
taosTmrReset(taosProcessTaosTimer, tsRpcTimer, pConn, pChann->tmrCtrl, &pConn->pTimer); taosTmrReset(taosProcessTaosTimer, tsRpcProgressTime, pConn, pChann->tmrCtrl, &pConn->pTimer);
code = TSDB_CODE_ALREADY_PROCESSED; code = TSDB_CODE_ALREADY_PROCESSED;
goto _exit; goto _exit;
} else { } else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册