fix invalid timeout
This commit is contained in:
parent
54fc2bfe9e
commit
f097de9fe0
|
@ -398,7 +398,7 @@ int32_t dmInitClient(SDnode *pDnode) {
|
||||||
rpcInit.notWaitAvaliableConn = 0;
|
rpcInit.notWaitAvaliableConn = 0;
|
||||||
|
|
||||||
(void)taosVersionStrToInt(version, &(rpcInit.compatibilityVer));
|
(void)taosVersionStrToInt(version, &(rpcInit.compatibilityVer));
|
||||||
rpcInit.startReadTimer = 0;
|
rpcInit.startReadTimer = 1;
|
||||||
pTrans->clientRpc = rpcOpen(&rpcInit);
|
pTrans->clientRpc = rpcOpen(&rpcInit);
|
||||||
if (pTrans->clientRpc == NULL) {
|
if (pTrans->clientRpc == NULL) {
|
||||||
dError("failed to init dnode rpc client since:%s", tstrerror(terrno));
|
dError("failed to init dnode rpc client since:%s", tstrerror(terrno));
|
||||||
|
@ -441,7 +441,7 @@ int32_t dmInitStatusClient(SDnode *pDnode) {
|
||||||
rpcInit.supportBatch = 1;
|
rpcInit.supportBatch = 1;
|
||||||
rpcInit.batchSize = 8 * 1024;
|
rpcInit.batchSize = 8 * 1024;
|
||||||
rpcInit.timeToGetConn = tsTimeToGetAvailableConn;
|
rpcInit.timeToGetConn = tsTimeToGetAvailableConn;
|
||||||
rpcInit.startReadTimer = 0;
|
rpcInit.startReadTimer = 1;
|
||||||
(void)taosVersionStrToInt(version, &(rpcInit.compatibilityVer));
|
(void)taosVersionStrToInt(version, &(rpcInit.compatibilityVer));
|
||||||
|
|
||||||
pTrans->statusRpc = rpcOpen(&rpcInit);
|
pTrans->statusRpc = rpcOpen(&rpcInit);
|
||||||
|
@ -488,7 +488,7 @@ int32_t dmInitSyncClient(SDnode *pDnode) {
|
||||||
rpcInit.batchSize = 8 * 1024;
|
rpcInit.batchSize = 8 * 1024;
|
||||||
rpcInit.timeToGetConn = tsTimeToGetAvailableConn;
|
rpcInit.timeToGetConn = tsTimeToGetAvailableConn;
|
||||||
(void)taosVersionStrToInt(version, &(rpcInit.compatibilityVer));
|
(void)taosVersionStrToInt(version, &(rpcInit.compatibilityVer));
|
||||||
rpcInit.startReadTimer = 0;
|
rpcInit.startReadTimer = 1;
|
||||||
pTrans->syncRpc = rpcOpen(&rpcInit);
|
pTrans->syncRpc = rpcOpen(&rpcInit);
|
||||||
if (pTrans->syncRpc == NULL) {
|
if (pTrans->syncRpc == NULL) {
|
||||||
dError("failed to init dnode rpc sync client since %s", tstrerror(terrno));
|
dError("failed to init dnode rpc sync client since %s", tstrerror(terrno));
|
||||||
|
|
|
@ -641,7 +641,7 @@ bool filterToRmTimoutReq(void* key, void* arg) {
|
||||||
if (pReq->msg.info.qId == 0 && !REQUEST_NO_RESP(&pReq->msg) && pReq->ctx) {
|
if (pReq->msg.info.qId == 0 && !REQUEST_NO_RESP(&pReq->msg) && pReq->ctx) {
|
||||||
int64_t elapse = ((taosGetTimestampUs() - pReq->st) / 1000);
|
int64_t elapse = ((taosGetTimestampUs() - pReq->st) / 1000);
|
||||||
if (elapse > READ_TIMEOUT) {
|
if (elapse > READ_TIMEOUT) {
|
||||||
return true;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue