Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
84706fe5
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
84706fe5
编写于
2月 24, 2023
作者:
dengyihao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix: limit session num
上级
dd2e9697
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
16 addition
and
11 deletion
+16
-11
include/common/tglobal.h
include/common/tglobal.h
+1
-0
include/libs/transport/trpc.h
include/libs/transport/trpc.h
+1
-1
source/client/src/clientEnv.c
source/client/src/clientEnv.c
+1
-0
source/client/src/clientImpl.c
source/client/src/clientImpl.c
+1
-0
source/common/src/tglobal.c
source/common/src/tglobal.c
+2
-2
source/dnode/mgmt/node_mgmt/src/dmTransport.c
source/dnode/mgmt/node_mgmt/src/dmTransport.c
+1
-0
source/libs/transport/inc/transportInt.h
source/libs/transport/inc/transportInt.h
+5
-5
source/libs/transport/src/trans.c
source/libs/transport/src/trans.c
+1
-1
source/libs/transport/src/transCli.c
source/libs/transport/src/transCli.c
+1
-1
tools/shell/src/shellNettest.c
tools/shell/src/shellNettest.c
+2
-1
未找到文件。
include/common/tglobal.h
浏览文件 @
84706fe5
...
...
@@ -50,6 +50,7 @@ extern int32_t tsTagFilterResCacheSize;
// queue & threads
extern
int32_t
tsNumOfRpcThreads
;
extern
int32_t
tsNumOfRpcSessions
;
extern
int32_t
tsTimeToGetAvailableConn
;
extern
int32_t
tsNumOfCommitThreads
;
extern
int32_t
tsNumOfTaskQueueThreads
;
extern
int32_t
tsNumOfMnodeQueryThreads
;
...
...
include/libs/transport/trpc.h
浏览文件 @
84706fe5
...
...
@@ -114,7 +114,7 @@ typedef struct SRpcInit {
int32_t
connLimitNum
;
int32_t
connLimitLock
;
int32_t
timeToGetConn
;
int8_t
supportBatch
;
// 0: no batch, 1. batch
int32_t
batchSize
;
void
*
parent
;
...
...
source/client/src/clientEnv.c
浏览文件 @
84706fe5
...
...
@@ -159,6 +159,7 @@ void *openTransporter(const char *user, const char *auth, int32_t numOfThread) {
connLimitNum
=
TMAX
(
connLimitNum
,
10
);
connLimitNum
=
TMIN
(
connLimitNum
,
500
);
rpcInit
.
connLimitNum
=
connLimitNum
;
rpcInit
.
timeToGetConn
=
tsTimeToGetAvailableConn
;
void
*
pDnodeConn
=
rpcOpen
(
&
rpcInit
);
if
(
pDnodeConn
==
NULL
)
{
...
...
source/client/src/clientImpl.c
浏览文件 @
84706fe5
...
...
@@ -2012,6 +2012,7 @@ TSDB_SERVER_STATUS taos_check_server_status(const char* fqdn, int port, char* de
connLimitNum
=
TMAX
(
connLimitNum
,
10
);
connLimitNum
=
TMIN
(
connLimitNum
,
500
);
rpcInit
.
connLimitNum
=
connLimitNum
;
rpcInit
.
timeToGetConn
=
tsTimeToGetAvailableConn
;
clientRpc
=
rpcOpen
(
&
rpcInit
);
if
(
clientRpc
==
NULL
)
{
...
...
source/common/src/tglobal.c
浏览文件 @
84706fe5
...
...
@@ -41,8 +41,8 @@ bool tsPrintAuth = false;
// queue & threads
int32_t
tsNumOfRpcThreads
=
1
;
int32_t
tsNumOfRpcSessions
=
2
000
;
int32_t
tsTimeToGetAvailableConn
=
1000
;
int32_t
tsNumOfRpcSessions
=
10
000
;
int32_t
tsTimeToGetAvailableConn
=
1000
0
;
int32_t
tsNumOfCommitThreads
=
2
;
int32_t
tsNumOfTaskQueueThreads
=
4
;
int32_t
tsNumOfMnodeQueryThreads
=
4
;
...
...
source/dnode/mgmt/node_mgmt/src/dmTransport.c
浏览文件 @
84706fe5
...
...
@@ -292,6 +292,7 @@ int32_t dmInitClient(SDnode *pDnode) {
rpcInit
.
connLimitLock
=
1
;
rpcInit
.
supportBatch
=
1
;
rpcInit
.
batchSize
=
8
*
1024
;
rpcInit
.
timeToGetConn
=
tsTimeToGetAvailableConn
;
pTrans
->
clientRpc
=
rpcOpen
(
&
rpcInit
);
if
(
pTrans
->
clientRpc
==
NULL
)
{
...
...
source/libs/transport/inc/transportInt.h
浏览文件 @
84706fe5
...
...
@@ -64,11 +64,11 @@ typedef struct {
void
(
*
destroyFp
)(
void
*
ahandle
);
bool
(
*
failFastFp
)(
tmsg_t
msgType
);
int32_t
connLimitNum
;
int8_t
connLimitLock
;
// 0: no lock. 1. lock
int8_t
supportBatch
;
// 0: no batch, 1: support batch
int32_t
batchSize
;
int32_t
connLimitNum
;
int8_t
connLimitLock
;
// 0: no lock. 1. lock
int8_t
supportBatch
;
// 0: no batch, 1: support batch
int32_t
batchSize
;
int32_t
timeToGetConn
;
int
index
;
void
*
parent
;
void
*
tcphandle
;
// returned handle from TCP initialization
...
...
source/libs/transport/src/trans.c
浏览文件 @
84706fe5
...
...
@@ -90,7 +90,7 @@ void* rpcOpen(const SRpcInit* pInit) {
if
(
pInit
->
user
)
{
tstrncpy
(
pRpc
->
user
,
pInit
->
user
,
sizeof
(
pRpc
->
user
));
}
pRpc
->
timeToGetConn
=
pInit
->
timeToGetConn
;
pRpc
->
tcphandle
=
(
*
taosInitHandle
[
pRpc
->
connType
])(
ip
,
pInit
->
localPort
,
pRpc
->
label
,
pRpc
->
numOfThreads
,
NULL
,
pRpc
);
...
...
source/libs/transport/src/transCli.c
浏览文件 @
84706fe5
...
...
@@ -1422,7 +1422,7 @@ static int32_t cliPreCheckSessionLimitForMsg(SCliThrd* pThrd, char* addr, SCliMs
arg
->
param1
=
pMsg
;
arg
->
param2
=
pThrd
;
pMsg
->
ctx
->
task
=
transDQSched
(
pThrd
->
waitConnQueue
,
doFreeTimeoutMsg
,
arg
,
200
);
pMsg
->
ctx
->
task
=
transDQSched
(
pThrd
->
waitConnQueue
,
doFreeTimeoutMsg
,
arg
,
pTransInst
->
timeToGetConn
);
tGTrace
(
"%s msg %s delay to send, wait for avaiable connect"
,
pTransInst
->
label
,
TMSG_INFO
(
pMsg
->
msg
.
msgType
));
QUEUE_PUSH
(
&
(
*
list
)
->
msgQ
,
&
pMsg
->
q
);
return
-
1
;
...
...
tools/shell/src/shellNettest.c
浏览文件 @
84706fe5
...
...
@@ -21,7 +21,7 @@ static void shellWorkAsClient() {
SRpcInit
rpcInit
=
{
0
};
SEpSet
epSet
=
{.
inUse
=
0
,
.
numOfEps
=
1
};
SRpcMsg
rpcRsp
=
{
0
};
void
*
clientRpc
=
NULL
;
void
*
clientRpc
=
NULL
;
char
pass
[
TSDB_PASSWORD_LEN
+
1
]
=
{
0
};
taosEncryptPass_c
((
uint8_t
*
)(
"_pwd"
),
strlen
(
"_pwd"
),
pass
);
...
...
@@ -31,6 +31,7 @@ static void shellWorkAsClient() {
rpcInit
.
connType
=
TAOS_CONN_CLIENT
;
rpcInit
.
idleTime
=
tsShellActivityTimer
*
1000
;
rpcInit
.
user
=
"_dnd"
;
rpcInit
.
timeToGetConn
=
tsTimeToGetAvailableConn
;
clientRpc
=
rpcOpen
(
&
rpcInit
);
if
(
clientRpc
==
NULL
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录