set rpc client max recv_thread num
This commit is contained in:
parent
b8f0c5244e
commit
4cfe9a48e9
|
@ -240,6 +240,9 @@ void *rpcOpen(const SRpcInit *pInit) {
|
||||||
pRpc->connType = pInit->connType;
|
pRpc->connType = pInit->connType;
|
||||||
if (pRpc->connType == TAOS_CONN_CLIENT) {
|
if (pRpc->connType == TAOS_CONN_CLIENT) {
|
||||||
pRpc->numOfThreads = pInit->numOfThreads;
|
pRpc->numOfThreads = pInit->numOfThreads;
|
||||||
|
if (pRpc->numOfThreads >= 10) {
|
||||||
|
pRpc->numOfThreads = 10;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
pRpc->numOfThreads = pInit->numOfThreads > TSDB_MAX_RPC_THREADS ? TSDB_MAX_RPC_THREADS : pInit->numOfThreads;
|
pRpc->numOfThreads = pInit->numOfThreads > TSDB_MAX_RPC_THREADS ? TSDB_MAX_RPC_THREADS : pInit->numOfThreads;
|
||||||
}
|
}
|
||||||
|
@ -752,8 +755,8 @@ static SRpcConn *rpcAllocateServerConn(SRpcInfo *pRpc, SRecvInfo *pRecv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
taosHashPut(pRpc->hash, hashstr, size, (char *)&pConn, POINTER_BYTES);
|
taosHashPut(pRpc->hash, hashstr, size, (char *)&pConn, POINTER_BYTES);
|
||||||
tDebug("%s %p server connection is allocated, uid:0x%x sid:%d key:%s spi:%d", pRpc->label, pConn, pConn->linkUid, sid,
|
tDebug("%s %p server connection is allocated, uid:0x%x sid:%d key:%s spi:%d", pRpc->label, pConn, pConn->linkUid,
|
||||||
hashstr, pConn->spi);
|
sid, hashstr, pConn->spi);
|
||||||
}
|
}
|
||||||
|
|
||||||
return pConn;
|
return pConn;
|
||||||
|
|
Loading…
Reference in New Issue