Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
0bb41e5b
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
0bb41e5b
编写于
9月 06, 2019
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use assert in code locations that can cause file corruption and set global configuration items
上级
391f2de0
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
29 addition
and
26 deletion
+29
-26
CMakeLists.txt
CMakeLists.txt
+0
-1
src/inc/tglobalcfg.h
src/inc/tglobalcfg.h
+8
-7
src/system/src/vnodeFile.c
src/system/src/vnodeFile.c
+4
-4
src/util/src/tglobalcfg.c
src/util/src/tglobalcfg.c
+16
-13
src/util/src/tlog.c
src/util/src/tlog.c
+1
-1
未找到文件。
CMakeLists.txt
浏览文件 @
0bb41e5b
...
...
@@ -36,7 +36,6 @@ IF (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
SET
(
TD_LINUX TRUE
)
ADD_DEFINITIONS
(
-DLINUX
)
IF
(
${
CMAKE_CXX_COMPILER_ID
}
MATCHES
"Clang"
)
SET
(
COMMON_FLAGS
"-std=gnu99 -Wall -fPIC -malign-double -g -Wno-char-subscripts -msse4.2 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILE"
)
ELSE
()
...
...
src/inc/tglobalcfg.h
浏览文件 @
0bb41e5b
...
...
@@ -72,9 +72,10 @@ extern float tsNumOfThreadsPerCore;
extern
float
tsRatioOfQueryThreads
;
extern
char
tsInternalIp
[];
extern
char
tsServerIpStr
[];
extern
int
tsNumOfVnodesPerCore
;
extern
int
tsNumOfTotalVnodes
;
extern
short
tsNumOfVnodesPerCore
;
extern
short
tsNumOfTotalVnodes
;
extern
int
tsShellsPerVnode
;
extern
short
tsCheckHeaderFile
;
extern
int
tsSessionsPerVnode
;
extern
int
tsAverageCacheBlocks
;
...
...
@@ -84,11 +85,11 @@ extern int tsRowsInFileBlock;
extern
float
tsFileBlockMinPercent
;
extern
short
tsNumOfBlocksPerMeter
;
extern
int
tsCommitTime
;
// seconds
extern
int
tsCommitLog
;
extern
int
tsAsyncLog
;
extern
int
tsCompression
;
extern
int
tsDaysPerFile
;
extern
short
tsCommitTime
;
// seconds
extern
short
tsCommitLog
;
extern
short
tsAsyncLog
;
extern
short
tsCompression
;
extern
short
tsDaysPerFile
;
extern
int
tsDaysToKeep
;
extern
int
tsReplications
;
...
...
src/system/src/vnodeFile.c
浏览文件 @
0bb41e5b
...
...
@@ -390,10 +390,10 @@ void vnodeCloseCommitFiles(SVnodeObj *pVnode) {
int
ret
;
// Check new if new header file is correct
#ifdef _CHECK_HEADER_FILE_
assert
(
vnodeCheckNewHeaderFile
(
pVnode
->
nfd
,
pVnode
)
==
0
);
#endif
if
(
tsCheckHeaderFile
!=
0
)
{
assert
(
vnodeCheckNewHeaderFile
(
pVnode
->
nfd
,
pVnode
)
==
0
);
}
close
(
pVnode
->
nfd
);
pVnode
->
nfd
=
0
;
...
...
src/util/src/tglobalcfg.c
浏览文件 @
0bb41e5b
...
...
@@ -70,8 +70,9 @@ float tsNumOfThreadsPerCore = 1.0;
float
tsRatioOfQueryThreads
=
0
.
5
;
char
tsInternalIp
[
TSDB_IPv4ADDR_LEN
]
=
{
0
};
char
tsServerIpStr
[
TSDB_IPv4ADDR_LEN
]
=
"0.0.0.0"
;
int
tsNumOfVnodesPerCore
=
8
;
int
tsNumOfTotalVnodes
=
0
;
short
tsNumOfVnodesPerCore
=
8
;
short
tsNumOfTotalVnodes
=
0
;
short
tsCheckHeaderFile
=
0
;
int
tsSessionsPerVnode
=
1000
;
int
tsCacheBlockSize
=
16384
;
// 256 columns
...
...
@@ -81,10 +82,10 @@ int tsRowsInFileBlock = 4096;
float
tsFileBlockMinPercent
=
0
.
05
;
short
tsNumOfBlocksPerMeter
=
100
;
int
tsCommitTime
=
3600
;
// seconds
int
tsCommitLog
=
1
;
int
tsCompression
=
2
;
int
tsDaysPerFile
=
10
;
short
tsCommitTime
=
3600
;
// seconds
short
tsCommitLog
=
1
;
short
tsCompression
=
2
;
short
tsDaysPerFile
=
10
;
int
tsDaysToKeep
=
3650
;
int
tsMaxShellConns
=
2000
;
...
...
@@ -418,10 +419,12 @@ void tsInitGlobalConfig() {
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
,
0
,
10
,
0
,
TSDB_CFG_UTYPE_NONE
);
tsInitConfigOption
(
cfg
++
,
"ratioOfQueryThreads"
,
&
tsRatioOfQueryThreads
,
TSDB_CFG_VTYPE_FLOAT
,
TSDB_CFG_CTYPE_B_CONFIG
,
0
.
1
,
0
.
9
,
0
,
TSDB_CFG_UTYPE_NONE
);
tsInitConfigOption
(
cfg
++
,
"numOfVnodesPerCore"
,
&
tsNumOfVnodesPerCore
,
TSDB_CFG_VTYPE_
IN
T
,
tsInitConfigOption
(
cfg
++
,
"numOfVnodesPerCore"
,
&
tsNumOfVnodesPerCore
,
TSDB_CFG_VTYPE_
SHOR
T
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
,
1
,
64
,
0
,
TSDB_CFG_UTYPE_NONE
);
tsInitConfigOption
(
cfg
++
,
"numOfTotalVnodes"
,
&
tsNumOfTotalVnodes
,
TSDB_CFG_VTYPE_
IN
T
,
TSDB_CFG_CTYPE_B_CONFIG
,
0
,
tsInitConfigOption
(
cfg
++
,
"numOfTotalVnodes"
,
&
tsNumOfTotalVnodes
,
TSDB_CFG_VTYPE_
SHOR
T
,
TSDB_CFG_CTYPE_B_CONFIG
,
0
,
TSDB_MAX_VNODES
,
0
,
TSDB_CFG_UTYPE_NONE
);
tsInitConfigOption
(
cfg
++
,
"checkHeaderFile"
,
&
tsCheckHeaderFile
,
TSDB_CFG_VTYPE_SHORT
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
,
0
,
1
,
0
,
TSDB_CFG_UTYPE_NONE
);
tsInitConfigOption
(
cfg
++
,
"tables"
,
&
tsSessionsPerVnode
,
TSDB_CFG_VTYPE_INT
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
,
4
,
220000
,
0
,
TSDB_CFG_UTYPE_NONE
);
tsInitConfigOption
(
cfg
++
,
"cache"
,
&
tsCacheBlockSize
,
TSDB_CFG_VTYPE_INT
,
...
...
@@ -442,7 +445,7 @@ void tsInitGlobalConfig() {
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
,
100
,
3000
,
0
,
TSDB_CFG_UTYPE_MS
);
tsInitConfigOption
(
cfg
++
,
"rpcMaxTime"
,
&
tsRpcMaxTime
,
TSDB_CFG_VTYPE_INT
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
,
100
,
7200
,
0
,
TSDB_CFG_UTYPE_SECOND
);
tsInitConfigOption
(
cfg
++
,
"ctime"
,
&
tsCommitTime
,
TSDB_CFG_VTYPE_
IN
T
,
tsInitConfigOption
(
cfg
++
,
"ctime"
,
&
tsCommitTime
,
TSDB_CFG_VTYPE_
SHOR
T
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
,
30
,
40960
,
0
,
TSDB_CFG_UTYPE_SECOND
);
tsInitConfigOption
(
cfg
++
,
"statusInterval"
,
&
tsStatusInterval
,
TSDB_CFG_VTYPE_INT
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
,
1
,
10
,
0
,
TSDB_CFG_UTYPE_SECOND
);
...
...
@@ -474,13 +477,13 @@ void tsInitGlobalConfig() {
tsInitConfigOption
(
cfg
++
,
"retryStreamCompDelay"
,
&
tsStreamCompRetryDelay
,
TSDB_CFG_VTYPE_INT
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
,
10
,
1000000000
,
0
,
TSDB_CFG_UTYPE_MS
);
tsInitConfigOption
(
cfg
++
,
"clog"
,
&
tsCommitLog
,
TSDB_CFG_VTYPE_
IN
T
,
tsInitConfigOption
(
cfg
++
,
"clog"
,
&
tsCommitLog
,
TSDB_CFG_VTYPE_
SHOR
T
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
,
0
,
1
,
0
,
TSDB_CFG_UTYPE_NONE
);
tsInitConfigOption
(
cfg
++
,
"comp"
,
&
tsCompression
,
TSDB_CFG_VTYPE_
IN
T
,
tsInitConfigOption
(
cfg
++
,
"comp"
,
&
tsCompression
,
TSDB_CFG_VTYPE_
SHOR
T
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
,
0
,
2
,
0
,
TSDB_CFG_UTYPE_NONE
);
// database configs
tsInitConfigOption
(
cfg
++
,
"days"
,
&
tsDaysPerFile
,
TSDB_CFG_VTYPE_
IN
T
,
tsInitConfigOption
(
cfg
++
,
"days"
,
&
tsDaysPerFile
,
TSDB_CFG_VTYPE_
SHOR
T
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
,
1
,
365
,
0
,
TSDB_CFG_UTYPE_NONE
);
tsInitConfigOption
(
cfg
++
,
"keep"
,
&
tsDaysToKeep
,
TSDB_CFG_VTYPE_INT
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
,
1
,
365000
,
0
,
TSDB_CFG_UTYPE_NONE
);
...
...
@@ -539,7 +542,7 @@ void tsInitGlobalConfig() {
tsInitConfigOption
(
cfg
++
,
"numOfLogLines"
,
&
tsNumOfLogLines
,
TSDB_CFG_VTYPE_INT
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_LOG
|
TSDB_CFG_CTYPE_B_CLIENT
,
10000
,
2000000000
,
0
,
TSDB_CFG_UTYPE_NONE
);
tsInitConfigOption
(
cfg
++
,
"asyncLog"
,
&
tsAsyncLog
,
TSDB_CFG_VTYPE_
IN
T
,
tsInitConfigOption
(
cfg
++
,
"asyncLog"
,
&
tsAsyncLog
,
TSDB_CFG_VTYPE_
SHOR
T
,
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_LOG
|
TSDB_CFG_CTYPE_B_CLIENT
,
0
,
1
,
0
,
TSDB_CFG_UTYPE_NONE
);
tsInitConfigOption
(
cfg
++
,
"debugFlag"
,
&
debugFlag
,
TSDB_CFG_VTYPE_INT
,
...
...
src/util/src/tlog.c
浏览文件 @
0bb41e5b
...
...
@@ -53,7 +53,7 @@ typedef struct {
}
SLogBuff
;
int
uDebugFlag
=
131
;
// all the messages
in
t
tsAsyncLog
=
1
;
shor
t
tsAsyncLog
=
1
;
static
SLogBuff
*
logHandle
;
static
int
taosLogFileNum
=
1
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录