fix issue #418
This commit is contained in:
parent
36d85a600f
commit
a9ad56780f
|
@ -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) {
|
||||||
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
|
||||||
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 {
|
||||||
|
|
Loading…
Reference in New Issue