Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
94e10bb1
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看板
提交
94e10bb1
编写于
5月 29, 2020
作者:
陶建辉(Jeff)
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
clean up some configurations parameters
上级
75f50850
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
31 addition
and
61 deletion
+31
-61
src/client/src/tscServer.c
src/client/src/tscServer.c
+2
-3
src/client/src/tscSystem.c
src/client/src/tscSystem.c
+4
-4
src/common/inc/tglobal.h
src/common/inc/tglobal.h
+2
-4
src/common/src/tglobal.c
src/common/src/tglobal.c
+10
-32
src/dnode/src/dnodeShell.c
src/dnode/src/dnodeShell.c
+1
-1
src/inc/taosdef.h
src/inc/taosdef.h
+0
-3
src/inc/taoserror.h
src/inc/taoserror.h
+10
-12
src/mnode/src/mnodeMain.c
src/mnode/src/mnodeMain.c
+2
-2
未找到文件。
src/client/src/tscServer.c
浏览文件 @
94e10bb1
...
...
@@ -238,9 +238,8 @@ void tscProcessMsgFromServer(SRpcMsg *rpcMsg, SRpcIpSet *pIpSet) {
}
else
{
STableMetaInfo
*
pTableMetaInfo
=
tscGetTableMetaInfoFromCmd
(
pCmd
,
pCmd
->
clauseIndex
,
0
);
if
(
rpcMsg
->
code
==
TSDB_CODE_NOT_ACTIVE_TABLE
||
rpcMsg
->
code
==
TSDB_CODE_INVALID_TABLE_ID
||
rpcMsg
->
code
==
TSDB_CODE_INVALID_VNODE_ID
||
rpcMsg
->
code
==
TSDB_CODE_NOT_ACTIVE_VNODE
||
rpcMsg
->
code
==
TSDB_CODE_NETWORK_UNAVAIL
||
rpcMsg
->
code
==
TSDB_CODE_NOT_ACTIVE_TABLE
||
rpcMsg
->
code
==
TSDB_CODE_TABLE_ID_MISMATCH
)
{
rpcMsg
->
code
==
TSDB_CODE_INVALID_VGROUP_ID
||
rpcMsg
->
code
==
TSDB_CODE_NOT_ACTIVE_VNODE
||
rpcMsg
->
code
==
TSDB_CODE_NETWORK_UNAVAIL
||
rpcMsg
->
code
==
TSDB_CODE_TABLE_ID_MISMATCH
)
{
/*
* not_active_table: 1. the virtual node may fail to create table, since the procedure of create table is asynchronized,
* the virtual node may have not create table till now, so try again by using the new metermeta.
...
...
src/client/src/tscSystem.c
浏览文件 @
94e10bb1
...
...
@@ -57,9 +57,9 @@ int32_t tscInitRpc(const char *user, const char *secret, void** pDnodeConn) {
memset
(
&
rpcInit
,
0
,
sizeof
(
rpcInit
));
rpcInit
.
localPort
=
0
;
rpcInit
.
label
=
"TSC"
;
rpcInit
.
numOfThreads
=
tscNumOfThreads
;
rpcInit
.
numOfThreads
=
1
;
// every DB connection has only one thread
rpcInit
.
cfp
=
tscProcessMsgFromServer
;
rpcInit
.
sessions
=
tsMax
Vnode
Connections
;
rpcInit
.
sessions
=
tsMaxConnections
;
rpcInit
.
connType
=
TAOS_CONN_CLIENT
;
rpcInit
.
user
=
(
char
*
)
user
;
rpcInit
.
idleTime
=
2000
;
...
...
@@ -121,7 +121,7 @@ void taos_init_imp() {
}
tscInitMsgsFp
();
int
queueSize
=
tsMax
VnodeConnections
+
tsMaxMeterConnections
+
tsMaxMgmtConnections
+
tsMaxMgmtConnections
;
int
queueSize
=
tsMax
Connections
*
2
;
if
(
tscEmbedded
==
0
)
{
tscNumOfThreads
=
tsNumOfCores
*
tsNumOfThreadsPerCore
/
2
.
0
;
...
...
@@ -137,7 +137,7 @@ void taos_init_imp() {
return
;
}
tscTmr
=
taosTmrInit
(
tsMax
Mgmt
Connections
*
2
,
200
,
60000
,
"TSC"
);
tscTmr
=
taosTmrInit
(
tsMaxConnections
*
2
,
200
,
60000
,
"TSC"
);
if
(
0
==
tscEmbedded
){
taosTmrReset
(
tscCheckDiskUsage
,
10
,
NULL
,
tscTmr
,
&
tscCheckDiskUsageTmr
);
}
...
...
src/common/inc/tglobal.h
浏览文件 @
94e10bb1
...
...
@@ -87,16 +87,14 @@ extern int16_t tsWAL;
extern
int32_t
tsReplications
;
extern
int16_t
tsAffectedRowsMod
;
extern
int32_t
tsNumOfM
Peer
s
;
extern
int32_t
tsNumOfM
node
s
;
extern
int32_t
tsMaxShellConns
;
extern
int32_t
tsMaxTables
;
extern
char
tsDefaultDB
[];
extern
char
tsDefaultUser
[];
extern
char
tsDefaultPass
[];
extern
int32_t
tsMaxMeterConnections
;
extern
int32_t
tsMaxVnodeConnections
;
extern
int32_t
tsMaxMgmtConnections
;
extern
int32_t
tsMaxConnections
;
extern
int32_t
tsBalanceInterval
;
extern
int32_t
tsOfflineThreshold
;
...
...
src/common/src/tglobal.c
浏览文件 @
94e10bb1
...
...
@@ -105,15 +105,13 @@ int32_t tsReplications = TSDB_DEFAULT_REPLICA_NUM;
* 1: affected rows include those duplicate records
*/
int16_t
tsAffectedRowsMod
=
0
;
int32_t
tsNumOfM
Peer
s
=
3
;
int32_t
tsMaxShellConns
=
2
000
;
int32_t
tsNumOfM
node
s
=
3
;
int32_t
tsMaxShellConns
=
5
000
;
char
tsDefaultDB
[
TSDB_DB_NAME_LEN
]
=
{
0
};
char
tsDefaultUser
[
64
]
=
"root"
;
char
tsDefaultPass
[
64
]
=
"taosdata"
;
int32_t
tsMaxMeterConnections
=
10000
;
int32_t
tsMaxMgmtConnections
=
2000
;
int32_t
tsMaxVnodeConnections
=
10000
;
int32_t
tsMaxConnections
=
50
;
int32_t
tsBalanceInterval
=
300
;
// seconds
int32_t
tsOfflineThreshold
=
86400
*
100
;
// seconds 10days
...
...
@@ -407,8 +405,8 @@ static void doInitGlobalConfig() {
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"numOfM
Peer
s"
;
cfg
.
ptr
=
&
tsNumOfM
Peer
s
;
cfg
.
option
=
"numOfM
node
s"
;
cfg
.
ptr
=
&
tsNumOfM
node
s
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
1
;
...
...
@@ -680,7 +678,7 @@ static void doInitGlobalConfig() {
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"wal
l
evel"
;
cfg
.
option
=
"wal
L
evel"
;
cfg
.
ptr
=
&
tsWAL
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT16
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
...
...
@@ -814,32 +812,12 @@ static void doInitGlobalConfig() {
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"max
Meter
Connections"
;
cfg
.
ptr
=
&
tsMax
Meter
Connections
;
cfg
.
option
=
"maxConnections"
;
cfg
.
ptr
=
&
tsMaxConnections
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
10
;
cfg
.
maxValue
=
50000000
;
cfg
.
ptrLength
=
0
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"maxMgmtConnections"
;
cfg
.
ptr
=
&
tsMaxMgmtConnections
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
10
;
cfg
.
maxValue
=
50000000
;
cfg
.
ptrLength
=
0
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"maxVnodeConnections"
;
cfg
.
ptr
=
&
tsMaxVnodeConnections
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
10
;
cfg
.
maxValue
=
50000000
;
cfg
.
minValue
=
1
;
cfg
.
maxValue
=
100
;
cfg
.
ptrLength
=
0
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
...
...
src/dnode/src/dnodeShell.c
浏览文件 @
94e10bb1
...
...
@@ -84,7 +84,7 @@ int32_t dnodeInitShell() {
rpcInit
.
label
=
"SHELL"
;
rpcInit
.
numOfThreads
=
numOfThreads
;
rpcInit
.
cfp
=
dnodeProcessMsgFromShell
;
rpcInit
.
sessions
=
TSDB_SESSIONS_PER_DNODE
;
rpcInit
.
sessions
=
tsMaxShellConns
;
rpcInit
.
connType
=
TAOS_CONN_SERVER
;
rpcInit
.
idleTime
=
tsShellActivityTimer
*
1000
;
rpcInit
.
afp
=
dnodeRetrieveUserAuthInfo
;
...
...
src/inc/taosdef.h
浏览文件 @
94e10bb1
...
...
@@ -338,9 +338,6 @@ void tsDataSwap(void *pLeft, void *pRight, int32_t type, int32_t size);
#define TSDB_ORDER_ASC 1
#define TSDB_ORDER_DESC 2
#define TSDB_SESSIONS_PER_VNODE (300)
#define TSDB_SESSIONS_PER_DNODE (TSDB_SESSIONS_PER_VNODE * TSDB_MAX_VNODES)
#define TSDB_DEFAULT_MNODES_HASH_SIZE 5
#define TSDB_DEFAULT_DNODES_HASH_SIZE 10
#define TSDB_DEFAULT_ACCOUNTS_HASH_SIZE 10
...
...
src/inc/taoserror.h
浏览文件 @
94e10bb1
...
...
@@ -72,9 +72,8 @@ TAOS_DEFINE_ERROR(TSDB_CODE_NO_RESOURCE, 0, 0x0018, "no resource"
TAOS_DEFINE_ERROR
(
TSDB_CODE_OPS_NOT_SUPPORT
,
0
,
0x0019
,
"operations not support"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_INVALID_OPTION
,
0
,
0x001A
,
"invalid option"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_NOT_CONFIGURED
,
0
,
0x001B
,
"not configured"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_NODE_OFFLINE
,
0
,
0x001C
,
"node offline"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_NETWORK_UNAVAIL
,
0
,
0x001D
,
"network unavailable"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_AUTH_REQUIRED
,
0
,
0x001E
,
"auth required"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_NETWORK_UNAVAIL
,
0
,
0x001C
,
"network unavailable"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_AUTH_REQUIRED
,
0
,
0x001D
,
"auth required"
)
// db
TAOS_DEFINE_ERROR
(
TSDB_CODE_DB_NOT_SELECTED
,
0
,
0x0100
,
"db not selected"
)
...
...
@@ -148,15 +147,14 @@ TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_CPU_LIMITED, 0, 0x038F, "grant cpu li
// server
TAOS_DEFINE_ERROR
(
TSDB_CODE_INVALID_VGROUP_ID
,
0
,
0x0400
,
"invalid vgroup id"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_INVALID_VNODE_ID
,
0
,
0x0401
,
"invalid vnode id"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_NOT_ACTIVE_VNODE
,
0
,
0x0402
,
"not active vnode"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VG_INIT_FAILED
,
0
,
0x0403
,
"vg init failed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SERV_NO_DISKSPACE
,
0
,
0x0404
,
"server no diskspace"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SERV_OUT_OF_MEMORY
,
0
,
0x0405
,
"server out of memory"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_NO_DISK_PERMISSIONS
,
0
,
0x0406
,
"no disk permissions"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_FILE_CORRUPTED
,
0
,
0x0407
,
"file corrupted"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MEMORY_CORRUPTED
,
0
,
0x0408
,
"memory corrupted"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_NOT_SUCH_FILE_OR_DIR
,
0
,
0x0409
,
"no such file or directory"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_NOT_ACTIVE_VNODE
,
0
,
0x0401
,
"not active vnode"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_VG_INIT_FAILED
,
0
,
0x0402
,
"vgroup init failed"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SERV_NO_DISKSPACE
,
0
,
0x0403
,
"server no diskspace"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SERV_OUT_OF_MEMORY
,
0
,
0x0404
,
"server out of memory"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_NO_DISK_PERMISSIONS
,
0
,
0x0405
,
"no disk permissions"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_FILE_CORRUPTED
,
0
,
0x0406
,
"file corrupted"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_MEMORY_CORRUPTED
,
0
,
0x0407
,
"memory corrupted"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_NOT_SUCH_FILE_OR_DIR
,
0
,
0x0408
,
"no such file or directory"
)
// client
TAOS_DEFINE_ERROR
(
TSDB_CODE_INVALID_CLIENT_VERSION
,
0
,
0x0481
,
"invalid client version"
)
...
...
src/mnode/src/mnodeMain.c
浏览文件 @
94e10bb1
...
...
@@ -160,7 +160,7 @@ void mnodeStopSystem() {
static
void
mnodeInitTimer
()
{
if
(
tsMnodeTmr
==
NULL
)
{
tsMnodeTmr
=
taosTmrInit
(
(
tsMaxShellConns
)
*
3
,
200
,
3600000
,
"MND"
);
tsMnodeTmr
=
taosTmrInit
(
tsMaxShellConns
,
200
,
3600000
,
"MND"
);
}
}
...
...
@@ -185,4 +185,4 @@ static bool mnodeNeedStart() {
bool
mnodeIsRunning
()
{
return
tsMgmtIsRunning
;
}
\ No newline at end of file
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录