From 4cf7b73fb1a08eb9a06fefb44b78d686a1f7aa6e Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Mon, 1 Jun 2020 07:41:13 +0000 Subject: [PATCH 1/3] remove debug info --- src/rpc/test/rserver.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rpc/test/rserver.c b/src/rpc/test/rserver.c index 508f04fbc3..f22fa35f52 100644 --- a/src/rpc/test/rserver.c +++ b/src/rpc/test/rserver.c @@ -115,7 +115,7 @@ int retrieveAuthInfo(char *meterId, char *spi, char *encrypt, char *secret, char void processRequestMsg(SRpcMsg *pMsg, SRpcIpSet *pIpSet) { SRpcMsg *pTemp; - + pTemp = taosAllocateQitem(sizeof(SRpcMsg)); memcpy(pTemp, pMsg, sizeof(SRpcMsg)); @@ -171,7 +171,6 @@ int main(int argc, char *argv[]) { tsAsyncLog = 0; rpcInit.connType = TAOS_CONN_SERVER; - taosInitLog("server.log", 100000, 10); void *pRpc = rpcOpen(&rpcInit); From 8edb2efdb1436c8e06f04589748ee5d3cfbeb400 Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Mon, 1 Jun 2020 07:42:03 +0000 Subject: [PATCH 2/3] debug info --- src/rpc/src/rpcMain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 405f796a5e..43d030e7e0 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -682,11 +682,11 @@ static SRpcConn *rpcSetupConnToServer(SRpcReqContext *pContext) { if (pConn) { pConn->ahandle = pContext->ahandle; sprintf(pConn->info, "%s %p %p", pRpc->label, pConn, pConn->ahandle); + pConn->tretry = 0; } else { tError("%s %p, failed to set up connection(%s)", pRpc->label, pContext->ahandle, tstrerror(terrno)); } - pConn->tretry = 0; return pConn; } From 2193cd32285d674c94c63e9a773f9f2374dbb19e Mon Sep 17 00:00:00 2001 From: Jeff Tao Date: Mon, 1 Jun 2020 08:19:19 +0000 Subject: [PATCH 3/3] make the timer longer --- src/rpc/src/rpcMain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc/src/rpcMain.c b/src/rpc/src/rpcMain.c index 43d030e7e0..b871af1aef 100644 --- a/src/rpc/src/rpcMain.c +++ b/src/rpc/src/rpcMain.c @@ -833,8 +833,8 @@ static SRpcConn *rpcProcessMsgHead(SRpcInfo *pRpc, SRecvInfo *pRecv) { terrno = rpcProcessReqHead(pConn, pHead); pConn->connType = pRecv->connType; - // client shall send the request within tsRpcTime again, put 20 mseconds tolerance - taosTmrReset(rpcProcessIdleTimer, tsRpcTimer+20, pConn, pRpc->tmrCtrl, &pConn->pIdleTimer); + // client shall send the request within tsRpcTime again, double it + taosTmrReset(rpcProcessIdleTimer, tsRpcTimer*2, pConn, pRpc->tmrCtrl, &pConn->pIdleTimer); } else { terrno = rpcProcessRspHead(pConn, pHead); }