Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
098949b5
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看板
提交
098949b5
编写于
2月 19, 2023
作者:
dengyihao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add trans param
上级
edb3d6f8
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
23 addition
and
8 deletion
+23
-8
include/common/tglobal.h
include/common/tglobal.h
+5
-4
source/common/src/tglobal.c
source/common/src/tglobal.c
+16
-2
source/dnode/mgmt/node_mgmt/src/dmTransport.c
source/dnode/mgmt/node_mgmt/src/dmTransport.c
+2
-2
未找到文件。
include/common/tglobal.h
浏览文件 @
098949b5
...
@@ -49,6 +49,7 @@ extern int32_t tsTagFilterResCacheSize;
...
@@ -49,6 +49,7 @@ extern int32_t tsTagFilterResCacheSize;
// queue & threads
// queue & threads
extern
int32_t
tsNumOfRpcThreads
;
extern
int32_t
tsNumOfRpcThreads
;
extern
int32_t
tsNumOfRpcSessions
;
extern
int32_t
tsNumOfCommitThreads
;
extern
int32_t
tsNumOfCommitThreads
;
extern
int32_t
tsNumOfTaskQueueThreads
;
extern
int32_t
tsNumOfTaskQueueThreads
;
extern
int32_t
tsNumOfMnodeQueryThreads
;
extern
int32_t
tsNumOfMnodeQueryThreads
;
...
@@ -86,9 +87,9 @@ extern int32_t tsTelemInterval;
...
@@ -86,9 +87,9 @@ extern int32_t tsTelemInterval;
extern
char
tsTelemServer
[];
extern
char
tsTelemServer
[];
extern
uint16_t
tsTelemPort
;
extern
uint16_t
tsTelemPort
;
extern
bool
tsEnableCrashReport
;
extern
bool
tsEnableCrashReport
;
extern
char
*
tsTelemUri
;
extern
char
*
tsTelemUri
;
extern
char
*
tsClientCrashReportUri
;
extern
char
*
tsClientCrashReportUri
;
extern
char
*
tsSvrCrashReportUri
;
extern
char
*
tsSvrCrashReportUri
;
// query buffer management
// query buffer management
extern
int32_t
tsQueryBufferSize
;
// maximum allowed usage buffer size in MB for each data node during query processing
extern
int32_t
tsQueryBufferSize
;
// maximum allowed usage buffer size in MB for each data node during query processing
...
@@ -159,7 +160,7 @@ extern int32_t tsUptimeInterval;
...
@@ -159,7 +160,7 @@ extern int32_t tsUptimeInterval;
extern
int32_t
tsRpcRetryLimit
;
extern
int32_t
tsRpcRetryLimit
;
extern
int32_t
tsRpcRetryInterval
;
extern
int32_t
tsRpcRetryInterval
;
extern
bool
tsDisableStream
;
extern
bool
tsDisableStream
;
// #define NEEDTO_COMPRESSS_MSG(size) (tsCompressMsgSize != -1 && (size) > tsCompressMsgSize)
// #define NEEDTO_COMPRESSS_MSG(size) (tsCompressMsgSize != -1 && (size) > tsCompressMsgSize)
...
...
source/common/src/tglobal.c
浏览文件 @
098949b5
...
@@ -41,6 +41,7 @@ bool tsPrintAuth = false;
...
@@ -41,6 +41,7 @@ bool tsPrintAuth = false;
// queue & threads
// queue & threads
int32_t
tsNumOfRpcThreads
=
1
;
int32_t
tsNumOfRpcThreads
=
1
;
int32_t
tsNumOfRpcSessions
=
2000
;
int32_t
tsNumOfCommitThreads
=
2
;
int32_t
tsNumOfCommitThreads
=
2
;
int32_t
tsNumOfTaskQueueThreads
=
4
;
int32_t
tsNumOfTaskQueueThreads
=
4
;
int32_t
tsNumOfMnodeQueryThreads
=
4
;
int32_t
tsNumOfMnodeQueryThreads
=
4
;
...
@@ -54,7 +55,6 @@ int32_t tsNumOfQnodeQueryThreads = 4;
...
@@ -54,7 +55,6 @@ int32_t tsNumOfQnodeQueryThreads = 4;
int32_t
tsNumOfQnodeFetchThreads
=
1
;
int32_t
tsNumOfQnodeFetchThreads
=
1
;
int32_t
tsNumOfSnodeStreamThreads
=
4
;
int32_t
tsNumOfSnodeStreamThreads
=
4
;
int32_t
tsNumOfSnodeWriteThreads
=
1
;
int32_t
tsNumOfSnodeWriteThreads
=
1
;
// sync raft
// sync raft
int32_t
tsElectInterval
=
25
*
1000
;
int32_t
tsElectInterval
=
25
*
1000
;
int32_t
tsHeartbeatInterval
=
1000
;
int32_t
tsHeartbeatInterval
=
1000
;
...
@@ -392,6 +392,9 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
...
@@ -392,6 +392,9 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
tsNumOfRpcThreads
=
TRANGE
(
tsNumOfRpcThreads
,
2
,
TSDB_MAX_RPC_THREADS
);
tsNumOfRpcThreads
=
TRANGE
(
tsNumOfRpcThreads
,
2
,
TSDB_MAX_RPC_THREADS
);
if
(
cfgAddInt32
(
pCfg
,
"numOfRpcThreads"
,
tsNumOfRpcThreads
,
1
,
1024
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"numOfRpcThreads"
,
tsNumOfRpcThreads
,
1
,
1024
,
0
)
!=
0
)
return
-
1
;
tsNumOfRpcSessions
=
TRANGE
(
tsNumOfRpcSessions
,
100
,
10000
);
if
(
cfgAddInt32
(
pCfg
,
"numOfRpcSessions"
,
tsNumOfRpcSessions
,
1
,
1024
,
0
)
!=
0
)
return
-
1
;
tsNumOfCommitThreads
=
tsNumOfCores
/
2
;
tsNumOfCommitThreads
=
tsNumOfCores
/
2
;
tsNumOfCommitThreads
=
TRANGE
(
tsNumOfCommitThreads
,
2
,
4
);
tsNumOfCommitThreads
=
TRANGE
(
tsNumOfCommitThreads
,
2
,
4
);
if
(
cfgAddInt32
(
pCfg
,
"numOfCommitThreads"
,
tsNumOfCommitThreads
,
1
,
1024
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"numOfCommitThreads"
,
tsNumOfCommitThreads
,
1
,
1024
,
0
)
!=
0
)
return
-
1
;
...
@@ -504,6 +507,14 @@ static int32_t taosUpdateServerCfg(SConfig *pCfg) {
...
@@ -504,6 +507,14 @@ static int32_t taosUpdateServerCfg(SConfig *pCfg) {
pItem
->
stype
=
stype
;
pItem
->
stype
=
stype
;
}
}
pItem
=
cfgGetItem
(
tsCfg
,
"numOfRpcSessions"
);
if
(
pItem
!=
NULL
&&
pItem
->
stype
==
CFG_STYPE_DEFAULT
)
{
tsNumOfRpcSessions
=
2000
;
tsNumOfRpcSessions
=
TRANGE
(
tsNumOfRpcSessions
,
100
,
10000
);
pItem
->
i32
=
tsNumOfRpcSessions
;
pItem
->
stype
=
stype
;
}
pItem
=
cfgGetItem
(
tsCfg
,
"numOfCommitThreads"
);
pItem
=
cfgGetItem
(
tsCfg
,
"numOfCommitThreads"
);
if
(
pItem
!=
NULL
&&
pItem
->
stype
==
CFG_STYPE_DEFAULT
)
{
if
(
pItem
!=
NULL
&&
pItem
->
stype
==
CFG_STYPE_DEFAULT
)
{
tsNumOfCommitThreads
=
numOfCores
/
2
;
tsNumOfCommitThreads
=
numOfCores
/
2
;
...
@@ -721,6 +732,7 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
...
@@ -721,6 +732,7 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
tsPrintAuth
=
cfgGetItem
(
pCfg
,
"printAuth"
)
->
bval
;
tsPrintAuth
=
cfgGetItem
(
pCfg
,
"printAuth"
)
->
bval
;
tsNumOfRpcThreads
=
cfgGetItem
(
pCfg
,
"numOfRpcThreads"
)
->
i32
;
tsNumOfRpcThreads
=
cfgGetItem
(
pCfg
,
"numOfRpcThreads"
)
->
i32
;
tsNumOfRpcSessions
=
cfgGetItem
(
pCfg
,
"numOfRpcSessions"
)
->
i32
;
tsNumOfCommitThreads
=
cfgGetItem
(
pCfg
,
"numOfCommitThreads"
)
->
i32
;
tsNumOfCommitThreads
=
cfgGetItem
(
pCfg
,
"numOfCommitThreads"
)
->
i32
;
tsNumOfMnodeReadThreads
=
cfgGetItem
(
pCfg
,
"numOfMnodeReadThreads"
)
->
i32
;
tsNumOfMnodeReadThreads
=
cfgGetItem
(
pCfg
,
"numOfMnodeReadThreads"
)
->
i32
;
tsNumOfVnodeQueryThreads
=
cfgGetItem
(
pCfg
,
"numOfVnodeQueryThreads"
)
->
i32
;
tsNumOfVnodeQueryThreads
=
cfgGetItem
(
pCfg
,
"numOfVnodeQueryThreads"
)
->
i32
;
...
@@ -771,7 +783,7 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
...
@@ -771,7 +783,7 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
if
(
tsQueryBufferSize
>=
0
)
{
if
(
tsQueryBufferSize
>=
0
)
{
tsQueryBufferSizeBytes
=
tsQueryBufferSize
*
1048576UL
;
tsQueryBufferSizeBytes
=
tsQueryBufferSize
*
1048576UL
;
}
}
tsDisableStream
=
cfgGetItem
(
pCfg
,
"disableStream"
)
->
bval
;
tsDisableStream
=
cfgGetItem
(
pCfg
,
"disableStream"
)
->
bval
;
GRANT_CFG_GET
;
GRANT_CFG_GET
;
...
@@ -980,6 +992,8 @@ int32_t taosSetCfg(SConfig *pCfg, char *name) {
...
@@ -980,6 +992,8 @@ int32_t taosSetCfg(SConfig *pCfg, char *name) {
tsNumOfTaskQueueThreads
=
cfgGetItem
(
pCfg
,
"numOfTaskQueueThreads"
)
->
i32
;
tsNumOfTaskQueueThreads
=
cfgGetItem
(
pCfg
,
"numOfTaskQueueThreads"
)
->
i32
;
}
else
if
(
strcasecmp
(
"numOfRpcThreads"
,
name
)
==
0
)
{
}
else
if
(
strcasecmp
(
"numOfRpcThreads"
,
name
)
==
0
)
{
tsNumOfRpcThreads
=
cfgGetItem
(
pCfg
,
"numOfRpcThreads"
)
->
i32
;
tsNumOfRpcThreads
=
cfgGetItem
(
pCfg
,
"numOfRpcThreads"
)
->
i32
;
}
else
if
(
strcasecmp
(
"numOfRpcSessions"
,
name
)
==
0
)
{
tsNumOfRpcSessions
=
cfgGetItem
(
pCfg
,
"numOfRpcSessions"
)
->
i32
;
}
else
if
(
strcasecmp
(
"numOfCommitThreads"
,
name
)
==
0
)
{
}
else
if
(
strcasecmp
(
"numOfCommitThreads"
,
name
)
==
0
)
{
tsNumOfCommitThreads
=
cfgGetItem
(
pCfg
,
"numOfCommitThreads"
)
->
i32
;
tsNumOfCommitThreads
=
cfgGetItem
(
pCfg
,
"numOfCommitThreads"
)
->
i32
;
}
else
if
(
strcasecmp
(
"numOfMnodeReadThreads"
,
name
)
==
0
)
{
}
else
if
(
strcasecmp
(
"numOfMnodeReadThreads"
,
name
)
==
0
)
{
...
...
source/dnode/mgmt/node_mgmt/src/dmTransport.c
浏览文件 @
098949b5
...
@@ -284,9 +284,9 @@ int32_t dmInitClient(SDnode *pDnode) {
...
@@ -284,9 +284,9 @@ int32_t dmInitClient(SDnode *pDnode) {
rpcInit
.
failFastThreshold
=
3
;
// failed threshold
rpcInit
.
failFastThreshold
=
3
;
// failed threshold
rpcInit
.
ffp
=
dmFailFastFp
;
rpcInit
.
ffp
=
dmFailFastFp
;
int32_t
connLimitNum
=
1000
/
(
tsNumOfRpcThreads
*
3
);
int32_t
connLimitNum
=
tsNumOfRpcSessions
/
(
tsNumOfRpcThreads
*
3
);
connLimitNum
=
TMAX
(
connLimitNum
,
10
);
connLimitNum
=
TMAX
(
connLimitNum
,
10
);
connLimitNum
=
TMIN
(
connLimitNum
,
50
);
connLimitNum
=
TMIN
(
connLimitNum
,
50
0
);
rpcInit
.
connLimitNum
=
connLimitNum
;
rpcInit
.
connLimitNum
=
connLimitNum
;
rpcInit
.
connLimitLock
=
1
;
rpcInit
.
connLimitLock
=
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录