Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
8ca1420f
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看板
提交
8ca1420f
编写于
5月 13, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: adjust global config
上级
e9586c69
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
16 addition
and
20 deletion
+16
-20
include/common/tglobal.h
include/common/tglobal.h
+0
-1
source/client/src/clientEnv.c
source/client/src/clientEnv.c
+1
-1
source/common/src/tglobal.c
source/common/src/tglobal.c
+13
-16
source/libs/qcom/src/queryUtil.c
source/libs/qcom/src/queryUtil.c
+1
-1
tools/shell/src/shellNettest.c
tools/shell/src/shellNettest.c
+1
-1
未找到文件。
include/common/tglobal.h
浏览文件 @
8ca1420f
...
@@ -34,7 +34,6 @@ extern int32_t tsVersion;
...
@@ -34,7 +34,6 @@ extern int32_t tsVersion;
extern
int32_t
tsStatusInterval
;
extern
int32_t
tsStatusInterval
;
// common
// common
extern
int32_t
tsMaxConnections
;
extern
int32_t
tsMaxShellConns
;
extern
int32_t
tsMaxShellConns
;
extern
int32_t
tsShellActivityTimer
;
extern
int32_t
tsShellActivityTimer
;
extern
int32_t
tsCompressMsgSize
;
extern
int32_t
tsCompressMsgSize
;
...
...
source/client/src/clientEnv.c
浏览文件 @
8ca1420f
...
@@ -91,7 +91,7 @@ void *openTransporter(const char *user, const char *auth, int32_t numOfThread) {
...
@@ -91,7 +91,7 @@ void *openTransporter(const char *user, const char *auth, int32_t numOfThread) {
rpcInit
.
label
=
"TSC"
;
rpcInit
.
label
=
"TSC"
;
rpcInit
.
numOfThreads
=
numOfThread
;
rpcInit
.
numOfThreads
=
numOfThread
;
rpcInit
.
cfp
=
processMsgFromServer
;
rpcInit
.
cfp
=
processMsgFromServer
;
rpcInit
.
sessions
=
tsMaxConnections
;
rpcInit
.
sessions
=
1024
;
rpcInit
.
connType
=
TAOS_CONN_CLIENT
;
rpcInit
.
connType
=
TAOS_CONN_CLIENT
;
rpcInit
.
user
=
(
char
*
)
user
;
rpcInit
.
user
=
(
char
*
)
user
;
rpcInit
.
idleTime
=
tsShellActivityTimer
*
1000
;
rpcInit
.
idleTime
=
tsShellActivityTimer
*
1000
;
...
...
source/common/src/tglobal.c
浏览文件 @
8ca1420f
...
@@ -33,18 +33,17 @@ int32_t tsStatusInterval = 1; // second
...
@@ -33,18 +33,17 @@ int32_t tsStatusInterval = 1; // second
// common
// common
int32_t
tsMaxShellConns
=
50000
;
int32_t
tsMaxShellConns
=
50000
;
int32_t
tsMaxConnections
=
50000
;
int32_t
tsShellActivityTimer
=
3
;
// second
int32_t
tsShellActivityTimer
=
3
;
// second
bool
tsEnableSlaveQuery
=
true
;
bool
tsEnableSlaveQuery
=
true
;
bool
tsPrintAuth
=
false
;
bool
tsPrintAuth
=
false
;
// multi process
// multi process
bool
tsMultiProcess
=
false
;
bool
tsMultiProcess
=
false
;
int32_t
tsMnodeShmSize
=
TSDB_MAX_WAL_SIZE
*
2
;
int32_t
tsMnodeShmSize
=
TSDB_MAX_WAL_SIZE
*
2
+
128
;
int32_t
tsVnodeShmSize
=
TSDB_MAX_WAL_SIZE
*
10
;
int32_t
tsVnodeShmSize
=
TSDB_MAX_WAL_SIZE
*
10
+
128
;
int32_t
tsQnodeShmSize
=
TSDB_MAX_WAL_SIZE
*
4
;
int32_t
tsQnodeShmSize
=
TSDB_MAX_WAL_SIZE
*
4
+
128
;
int32_t
tsSnodeShmSize
=
TSDB_MAX_WAL_SIZE
*
4
;
int32_t
tsSnodeShmSize
=
TSDB_MAX_WAL_SIZE
*
4
+
128
;
int32_t
tsBnodeShmSize
=
TSDB_MAX_WAL_SIZE
*
4
;
int32_t
tsBnodeShmSize
=
TSDB_MAX_WAL_SIZE
*
4
+
128
;
// queue & threads
// queue & threads
int32_t
tsNumOfRpcThreads
=
1
;
int32_t
tsNumOfRpcThreads
=
1
;
...
@@ -351,15 +350,14 @@ static int32_t taosAddSystemCfg(SConfig *pCfg) {
...
@@ -351,15 +350,14 @@ static int32_t taosAddSystemCfg(SConfig *pCfg) {
}
}
static
int32_t
taosAddServerCfg
(
SConfig
*
pCfg
)
{
static
int32_t
taosAddServerCfg
(
SConfig
*
pCfg
)
{
if
(
cfgAddInt32
(
pCfg
,
"supportVnodes"
,
256
,
0
,
4096
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddDir
(
pCfg
,
"dataDir"
,
tsDataDir
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddDir
(
pCfg
,
"dataDir"
,
tsDataDir
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddFloat
(
pCfg
,
"minimalDataDirGB"
,
2
.
0
f
,
0
.
001
f
,
10000000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddFloat
(
pCfg
,
"minimalDataDirGB"
,
2
.
0
f
,
0
.
001
f
,
10000000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"maxNumOfDistinctRes"
,
tsMaxNumOfDistinctResults
,
10
*
10000
,
10000
*
10000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"supportVnodes"
,
256
,
0
,
4096
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"maxConnections"
,
tsMaxConnections
,
1
,
100000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"maxShellConns"
,
tsMaxShellConns
,
10
,
50000000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"maxShellConns"
,
tsMaxShellConns
,
10
,
50000000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"statusInterval"
,
tsStatusInterval
,
1
,
30
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"statusInterval"
,
tsStatusInterval
,
1
,
30
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"minSlidingTime"
,
tsMinSlidingTime
,
10
,
1000000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"minSlidingTime"
,
tsMinSlidingTime
,
10
,
1000000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"minIntervalTime"
,
tsMinIntervalTime
,
1
,
1000000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"minIntervalTime"
,
tsMinIntervalTime
,
1
,
1000000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"maxNumOfDistinctRes"
,
tsMaxNumOfDistinctResults
,
10
*
10000
,
10000
*
10000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"maxStreamCompDelay"
,
tsMaxStreamComputDelay
,
10
,
1000000000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"maxStreamCompDelay"
,
tsMaxStreamComputDelay
,
10
,
1000000000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"maxFirstStreamCompDelay"
,
tsStreamCompStartDelay
,
1000
,
1000000000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"maxFirstStreamCompDelay"
,
tsStreamCompStartDelay
,
1000
,
1000000000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"retryStreamCompDelay"
,
tsRetryStreamCompDelay
,
10
,
1000000000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"retryStreamCompDelay"
,
tsRetryStreamCompDelay
,
10
,
1000000000
,
0
)
!=
0
)
return
-
1
;
...
@@ -371,11 +369,11 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
...
@@ -371,11 +369,11 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
if
(
cfgAddBool
(
pCfg
,
"deadLockKillQuery"
,
tsDeadLockKillQuery
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddBool
(
pCfg
,
"deadLockKillQuery"
,
tsDeadLockKillQuery
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddBool
(
pCfg
,
"multiProcess"
,
tsMultiProcess
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddBool
(
pCfg
,
"multiProcess"
,
tsMultiProcess
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"mnodeShmSize"
,
tsMnodeShmSize
,
4096
,
INT32_MAX
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"mnodeShmSize"
,
tsMnodeShmSize
,
TSDB_MAX_WAL_SIZE
+
128
,
INT32_MAX
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"vnodeShmSize"
,
tsVnodeShmSize
,
4096
,
INT32_MAX
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"vnodeShmSize"
,
tsVnodeShmSize
,
TSDB_MAX_WAL_SIZE
+
128
,
INT32_MAX
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"qnodeShmSize"
,
tsQnodeShmSize
,
4096
,
INT32_MAX
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"qnodeShmSize"
,
tsQnodeShmSize
,
TSDB_MAX_WAL_SIZE
+
128
,
INT32_MAX
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"snodeShmSize"
,
tsSnodeShmSize
,
4096
,
INT32_MAX
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"snodeShmSize"
,
tsSnodeShmSize
,
TSDB_MAX_WAL_SIZE
+
128
,
INT32_MAX
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"bnodeShmSize"
,
tsBnodeShmSize
,
4096
,
INT32_MAX
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"bnodeShmSize"
,
tsBnodeShmSize
,
TSDB_MAX_WAL_SIZE
+
128
,
INT32_MAX
,
0
)
!=
0
)
return
-
1
;
tsNumOfRpcThreads
=
tsNumOfCores
/
2
;
tsNumOfRpcThreads
=
tsNumOfCores
/
2
;
tsNumOfRpcThreads
=
TRANGE
(
tsNumOfRpcThreads
,
1
,
4
);
tsNumOfRpcThreads
=
TRANGE
(
tsNumOfRpcThreads
,
1
,
4
);
...
@@ -533,12 +531,11 @@ static void taosSetSystemCfg(SConfig *pCfg) {
...
@@ -533,12 +531,11 @@ static void taosSetSystemCfg(SConfig *pCfg) {
static
int32_t
taosSetServerCfg
(
SConfig
*
pCfg
)
{
static
int32_t
taosSetServerCfg
(
SConfig
*
pCfg
)
{
tsDataSpace
.
reserved
=
cfgGetItem
(
pCfg
,
"minimalDataDirGB"
)
->
fval
;
tsDataSpace
.
reserved
=
cfgGetItem
(
pCfg
,
"minimalDataDirGB"
)
->
fval
;
tsMaxNumOfDistinctResults
=
cfgGetItem
(
pCfg
,
"maxNumOfDistinctRes"
)
->
i32
;
tsMaxConnections
=
cfgGetItem
(
pCfg
,
"maxConnections"
)
->
i32
;
tsMaxShellConns
=
cfgGetItem
(
pCfg
,
"maxShellConns"
)
->
i32
;
tsMaxShellConns
=
cfgGetItem
(
pCfg
,
"maxShellConns"
)
->
i32
;
tsStatusInterval
=
cfgGetItem
(
pCfg
,
"statusInterval"
)
->
i32
;
tsStatusInterval
=
cfgGetItem
(
pCfg
,
"statusInterval"
)
->
i32
;
tsMinSlidingTime
=
cfgGetItem
(
pCfg
,
"minSlidingTime"
)
->
i32
;
tsMinSlidingTime
=
cfgGetItem
(
pCfg
,
"minSlidingTime"
)
->
i32
;
tsMinIntervalTime
=
cfgGetItem
(
pCfg
,
"minIntervalTime"
)
->
i32
;
tsMinIntervalTime
=
cfgGetItem
(
pCfg
,
"minIntervalTime"
)
->
i32
;
tsMaxNumOfDistinctResults
=
cfgGetItem
(
pCfg
,
"maxNumOfDistinctRes"
)
->
i32
;
tsMaxStreamComputDelay
=
cfgGetItem
(
pCfg
,
"maxStreamCompDelay"
)
->
i32
;
tsMaxStreamComputDelay
=
cfgGetItem
(
pCfg
,
"maxStreamCompDelay"
)
->
i32
;
tsStreamCompStartDelay
=
cfgGetItem
(
pCfg
,
"maxFirstStreamCompDelay"
)
->
i32
;
tsStreamCompStartDelay
=
cfgGetItem
(
pCfg
,
"maxFirstStreamCompDelay"
)
->
i32
;
tsRetryStreamCompDelay
=
cfgGetItem
(
pCfg
,
"retryStreamCompDelay"
)
->
i32
;
tsRetryStreamCompDelay
=
cfgGetItem
(
pCfg
,
"retryStreamCompDelay"
)
->
i32
;
...
...
source/libs/qcom/src/queryUtil.c
浏览文件 @
8ca1420f
...
@@ -97,7 +97,7 @@ bool tIsValidSchema(struct SSchema* pSchema, int32_t numOfCols, int32_t numOfTag
...
@@ -97,7 +97,7 @@ bool tIsValidSchema(struct SSchema* pSchema, int32_t numOfCols, int32_t numOfTag
static
void
*
pTaskQueue
=
NULL
;
static
void
*
pTaskQueue
=
NULL
;
int32_t
initTaskQueue
()
{
int32_t
initTaskQueue
()
{
int32_t
queueSize
=
tsMax
Connectio
ns
*
2
;
int32_t
queueSize
=
tsMax
ShellCon
ns
*
2
;
pTaskQueue
=
taosInitScheduler
(
queueSize
,
tsNumOfTaskQueueThreads
,
"tsc"
);
pTaskQueue
=
taosInitScheduler
(
queueSize
,
tsNumOfTaskQueueThreads
,
"tsc"
);
if
(
NULL
==
pTaskQueue
)
{
if
(
NULL
==
pTaskQueue
)
{
qError
(
"failed to init task queue"
);
qError
(
"failed to init task queue"
);
...
...
tools/shell/src/shellNettest.c
浏览文件 @
8ca1420f
...
@@ -119,7 +119,7 @@ static void shellWorkAsServer() {
...
@@ -119,7 +119,7 @@ static void shellWorkAsServer() {
memcpy
(
rpcInit
.
localFqdn
,
tsLocalFqdn
,
strlen
(
tsLocalFqdn
));
memcpy
(
rpcInit
.
localFqdn
,
tsLocalFqdn
,
strlen
(
tsLocalFqdn
));
rpcInit
.
localPort
=
pArgs
->
port
;
rpcInit
.
localPort
=
pArgs
->
port
;
rpcInit
.
label
=
"CHK"
;
rpcInit
.
label
=
"CHK"
;
rpcInit
.
numOfThreads
=
tsNumOfRpcThreads
;
rpcInit
.
numOfThreads
=
2
;
rpcInit
.
cfp
=
(
RpcCfp
)
shellProcessMsg
;
rpcInit
.
cfp
=
(
RpcCfp
)
shellProcessMsg
;
rpcInit
.
sessions
=
10
;
rpcInit
.
sessions
=
10
;
rpcInit
.
connType
=
TAOS_CONN_SERVER
;
rpcInit
.
connType
=
TAOS_CONN_SERVER
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录