Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
72cb0421
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1185
Star
22015
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
72cb0421
编写于
6月 23, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
6月 23, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2423 from taosdata/hotfix/crash
Hotfix/crash
上级
e2a05d3a
bfcce101
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
6589 addition
and
323 deletion
+6589
-323
src/client/src/tscSystem.c
src/client/src/tscSystem.c
+0
-16
src/common/inc/tglobal.h
src/common/inc/tglobal.h
+90
-99
src/common/src/tglobal.c
src/common/src/tglobal.c
+133
-182
src/inc/taos.h
src/inc/taos.h
+0
-1
src/inc/tbalance.h
src/inc/tbalance.h
+2
-2
src/mnode/src/mnodeBalance.c
src/mnode/src/mnodeBalance.c
+2
-2
src/mnode/src/mnodeDb.c
src/mnode/src/mnodeDb.c
+1
-1
src/mnode/src/mnodeDnode.c
src/mnode/src/mnodeDnode.c
+3
-3
src/util/inc/ttimer.h
src/util/inc/ttimer.h
+1
-1
src/util/src/ttimer.c
src/util/src/ttimer.c
+4
-4
tests/script/general/table/autocreate.sim
tests/script/general/table/autocreate.sim
+12
-12
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+1
-0
tests/script/jenkins/bug.txt
tests/script/jenkins/bug.txt
+6340
-0
未找到文件。
src/client/src/tscSystem.c
浏览文件 @
72cb0421
...
...
@@ -314,22 +314,6 @@ static int taos_options_imp(TSDB_OPTION option, const char *pStr) {
}
break
;
case
TSDB_OPTION_SOCKET_TYPE
:
cfg
=
taosGetConfigOption
(
"sockettype"
);
assert
(
cfg
!=
NULL
);
if
(
cfg
->
cfgStatus
<=
TAOS_CFG_CSTATUS_OPTION
)
{
// if (strcasecmp(pStr, TAOS_SOCKET_TYPE_NAME_UDP) != 0 && strcasecmp(pStr, TAOS_SOCKET_TYPE_NAME_TCP) != 0) {
// tscError("only 'tcp' or 'udp' allowed for configuring the socket type");
// return -1;
// }
tstrncpy
(
tsSocketType
,
pStr
,
sizeof
(
tsSocketType
));
cfg
->
cfgStatus
=
TAOS_CFG_CSTATUS_OPTION
;
tscPrint
(
"socket type is set:%s"
,
tsSocketType
);
}
break
;
default:
// TODO return the correct error code to client in the format for taos_errstr()
tscError
(
"Invalid option %d"
,
option
);
...
...
src/common/inc/tglobal.h
浏览文件 @
72cb0421
...
...
@@ -20,60 +20,51 @@
extern
"C"
{
#endif
extern
char
configDir
[];
extern
char
tsVnodeDir
[];
extern
char
tsDnodeDir
[];
extern
char
tsMnodeDir
[];
extern
char
tsDataDir
[];
extern
char
tsLogDir
[];
extern
char
tsScriptDir
[];
extern
char
tsOsName
[];
// system info
extern
int64_t
tsPageSize
;
extern
int64_t
tsOpenMax
;
extern
int64_t
tsStreamMax
;
extern
int32_t
tsNumOfCores
;
extern
int32_t
tsAlternativeRole
;
extern
float
tsTotalLogDirGB
;
extern
float
tsTotalTmpDirGB
;
extern
float
tsTotalDataDirGB
;
extern
float
tsAvailLogDirGB
;
extern
float
tsAvailTmpDirGB
;
extern
float
tsAvailDataDirGB
;
extern
float
tsMinimalLogDirGB
;
extern
float
tsMinimalTmpDirGB
;
extern
float
tsMinimalDataDirGB
;
extern
int32_t
tsEnableCoreFile
;
extern
int32_t
tsTotalMemoryMB
;
extern
int32_t
tsVersion
;
extern
int32_t
tscEmbedded
;
extern
int64_t
tsMsPerDay
[
3
];
extern
char
tsFirst
[];
extern
char
tsSecond
[];
extern
char
tsLocalFqdn
[];
extern
char
tsLocalEp
[];
// cluster
extern
char
tsFirst
[];
extern
char
tsSecond
[];
extern
char
tsLocalFqdn
[];
extern
char
tsLocalEp
[];
extern
uint16_t
tsServerPort
;
extern
uint16_t
tsDnodeShellPort
;
extern
uint16_t
tsDnodeDnodePort
;
extern
uint16_t
tsSyncPort
;
extern
int32_t
tsStatusInterval
;
extern
int32_t
tsShellActivityTimer
;
extern
int32_t
tsVnodePeerHBTimer
;
extern
int32_t
tsMgmtPeerHBTimer
;
extern
int32_t
tsTableMetaKeepTimer
;
extern
float
tsNumOfThreadsPerCore
;
extern
float
tsRatioOfQueryThreads
;
extern
char
tsPublicIp
[];
extern
char
tsPrivateIp
[];
extern
int32_t
tsStatusInterval
;
extern
int16_t
tsNumOfVnodesPerCore
;
extern
int16_t
tsNumOfTotalVnodes
;
extern
uint32_t
tsPublicIpInt
;
extern
int32_t
tsNumOfMnodes
;
// common
extern
int
tsRpcTimer
;
extern
int
tsRpcMaxTime
;
extern
int32_t
tsMaxConnections
;
extern
int32_t
tsMaxShellConns
;
extern
int32_t
tsShellActivityTimer
;
extern
uint32_t
tsMaxTmrCtrl
;
extern
float
tsNumOfThreadsPerCore
;
extern
float
tsRatioOfQueryThreads
;
extern
int8_t
tsDaylight
;
extern
char
tsTimezone
[
64
];
extern
char
tsLocale
[
64
];
extern
char
tsCharset
[
64
];
// default encode string
extern
int32_t
tsEnableCoreFile
;
extern
int32_t
tsCompressMsgSize
;
// client
extern
int32_t
tsTableMetaKeepTimer
;
extern
int32_t
tsMaxSQLStringLen
;
extern
int32_t
tsTscEnableRecordSql
;
extern
int32_t
tsMaxNumOfOrderedResults
;
extern
int32_t
tsMinSlidingTime
;
extern
int32_t
tsMinIntervalTime
;
extern
int32_t
tsMaxStreamComputDelay
;
extern
int32_t
tsStreamCompStartDelay
;
extern
int32_t
tsStreamCompRetryDelay
;
extern
float
tsStreamComputDelayRatio
;
// the delayed computing ration of the whole time window
extern
int32_t
tsProjectExecInterval
;
extern
int64_t
tsMaxRetentWindow
;
// db parameters in client
extern
int32_t
tsCacheBlockSize
;
extern
int32_t
tsBlocksPerVnode
;
extern
int32_t
tsMaxTablePerVnode
;
...
...
@@ -87,42 +78,16 @@ extern int16_t tsCompression;
extern
int16_t
tsWAL
;
extern
int32_t
tsReplications
;
extern
int16_t
tsAffectedRowsMod
;
extern
int32_t
tsNumOfMnodes
;
extern
int32_t
tsMaxShellConns
;
extern
int32_t
tsMaxTables
;
extern
char
tsMqttBrokerAddress
[];
extern
char
tsMqttBrokerClientId
[];
extern
int32_t
tsMaxConnections
;
// balance
extern
int32_t
tsEnableBalance
;
extern
int32_t
tsAlternativeRole
;
extern
int32_t
tsBalanceInterval
;
extern
int32_t
tsOfflineThreshold
;
extern
int32_t
tsMnodeEqualVnodeNum
;
extern
int32_t
tsEnableHttpModule
;
extern
int32_t
tsEnableMqttModule
;
extern
int32_t
tsEnableMonitorModule
;
extern
int32_t
tsRestRowLimit
;
extern
int32_t
tsMaxSQLStringLen
;
extern
int32_t
tsCompressMsgSize
;
extern
int32_t
tsMaxNumOfOrderedResults
;
extern
char
tsSocketType
[
4
];
extern
int32_t
tsMinSlidingTime
;
extern
int32_t
tsMinIntervalTime
;
extern
int32_t
tsMaxStreamComputDelay
;
extern
int32_t
tsStreamCompStartDelay
;
extern
int32_t
tsStreamCompRetryDelay
;
extern
float
tsStreamComputDelayRatio
;
// the delayed computing ration of the whole time window
extern
int
tsProjectExecInterval
;
extern
int64_t
tsMaxRetentWindow
;
extern
char
tsHttpIp
[];
// restful
extern
int32_t
tsEnableHttpModule
;
extern
int32_t
tsRestRowLimit
;
extern
uint16_t
tsHttpPort
;
extern
int32_t
tsHttpCacheSessions
;
extern
int32_t
tsHttpSessionExpire
;
...
...
@@ -131,12 +96,54 @@ extern int32_t tsHttpEnableCompress;
extern
int32_t
tsHttpEnableRecordSql
;
extern
int32_t
tsTelegrafUseFieldNum
;
extern
int32_t
tsTscEnableRecordSql
;
// mqtt
extern
int32_t
tsEnableMqttModule
;
extern
char
tsMqttBrokerAddress
[];
extern
char
tsMqttBrokerClientId
[];
// monitor
extern
int32_t
tsEnableMonitorModule
;
extern
char
tsMonitorDbName
[];
extern
char
tsInternalPass
[];
extern
int32_t
tsMonitorInterval
;
// internal
extern
int32_t
tscEmbedded
;
extern
char
configDir
[];
extern
char
tsVnodeDir
[];
extern
char
tsDnodeDir
[];
extern
char
tsMnodeDir
[];
extern
char
tsDataDir
[];
extern
char
tsLogDir
[];
extern
char
tsScriptDir
[];
extern
int64_t
tsMsPerDay
[
3
];
// system info
extern
char
tsOsName
[];
extern
int64_t
tsPageSize
;
extern
int64_t
tsOpenMax
;
extern
int64_t
tsStreamMax
;
extern
int32_t
tsNumOfCores
;
extern
float
tsTotalLogDirGB
;
extern
float
tsTotalTmpDirGB
;
extern
float
tsTotalDataDirGB
;
extern
float
tsAvailLogDirGB
;
extern
float
tsAvailTmpDirGB
;
extern
float
tsAvailDataDirGB
;
extern
float
tsMinimalLogDirGB
;
extern
float
tsMinimalTmpDirGB
;
extern
float
tsMinimalDataDirGB
;
extern
int32_t
tsTotalMemoryMB
;
extern
int32_t
tsVersion
;
extern
char
tsMonitorDbName
[];
extern
char
tsInternalPass
[];
extern
int32_t
tsMonitorInterval
;
// build info
extern
char
version
[];
extern
char
compatible_version
[];
extern
char
gitinfo
[];
extern
char
gitinfoOfInternal
[];
extern
char
buildinfo
[];
// log
extern
int32_t
tsAsyncLog
;
extern
int32_t
tsNumOfLogLines
;
extern
int32_t
dDebugFlag
;
...
...
@@ -155,22 +162,6 @@ extern int32_t debugFlag;
extern
int32_t
odbcDebugFlag
;
extern
int32_t
qDebugFlag
;
extern
uint32_t
taosMaxTmrCtrl
;
extern
int
tsRpcTimer
;
extern
int
tsRpcMaxTime
;
extern
int
tsUdpDelay
;
extern
char
version
[];
extern
char
compatible_version
[];
extern
char
gitinfo
[];
extern
char
gitinfoOfInternal
[];
extern
char
buildinfo
[];
extern
int8_t
tsDaylight
;
extern
char
tsTimezone
[
64
];
extern
char
tsLocale
[
64
];
extern
char
tsCharset
[
64
];
// default encode string
#define NEEDTO_COMPRESSS_MSG(size) (tsCompressMsgSize != -1 && (size) > tsCompressMsgSize)
void
taosInitGlobalCfg
();
...
...
src/common/src/tglobal.c
浏览文件 @
72cb0421
...
...
@@ -27,68 +27,77 @@
#include "ttimezone.h"
#include "tsync.h"
char
configDir
[
TSDB_FILENAME_LEN
]
=
"/etc/taos"
;
char
tsVnodeDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsDnodeDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsMnodeDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsDataDir
[
TSDB_FILENAME_LEN
]
=
"/var/lib/taos"
;
char
tsScriptDir
[
TSDB_FILENAME_LEN
]
=
"/etc/taos"
;
char
tsOsName
[
10
]
=
"Linux"
;
// system info, not configurable
int64_t
tsPageSize
;
int64_t
tsOpenMax
;
int64_t
tsStreamMax
;
int32_t
tsNumOfCores
=
1
;
int32_t
tsAlternativeRole
=
0
;
float
tsTotalTmpDirGB
=
0
;
float
tsTotalDataDirGB
=
0
;
float
tsAvailTmpDirGB
=
0
;
float
tsAvailDataDirGB
=
0
;
float
tsMinimalTmpDirGB
=
0
.
1
;
float
tsMinimalDataDirGB
=
0
.
5
;
int32_t
tsTotalMemoryMB
=
0
;
int32_t
tsVersion
=
0
;
int32_t
tsEnableCoreFile
=
0
;
// global, not configurable
int32_t
tscEmbedded
=
0
;
/*
* minimum scale for whole system, millisecond by default
* for TSDB_TIME_PRECISION_MILLI: 86400000L
* TSDB_TIME_PRECISION_MICRO: 86400000000L
* TSDB_TIME_PRECISION_NANO: 86400000000000L
*/
int64_t
tsMsPerDay
[]
=
{
86400000L
,
86400000000L
,
86400000000000L
};
char
tsFirst
[
TSDB_EP_LEN
]
=
{
0
};
char
tsSecond
[
TSDB_EP_LEN
]
=
{
0
};
char
tsArbitrator
[
TSDB_EP_LEN
]
=
{
0
};
char
tsLocalFqdn
[
TSDB_FQDN_LEN
]
=
{
0
};
char
tsLocalEp
[
TSDB_EP_LEN
]
=
{
0
};
// Local End Point, hostname:port
// cluster
char
tsFirst
[
TSDB_EP_LEN
]
=
{
0
};
char
tsSecond
[
TSDB_EP_LEN
]
=
{
0
};
char
tsArbitrator
[
TSDB_EP_LEN
]
=
{
0
};
char
tsLocalFqdn
[
TSDB_FQDN_LEN
]
=
{
0
};
char
tsLocalEp
[
TSDB_EP_LEN
]
=
{
0
};
// Local End Point, hostname:port
uint16_t
tsServerPort
=
6030
;
uint16_t
tsDnodeShellPort
=
6030
;
// udp[6035-6039] tcp[6035]
uint16_t
tsDnodeDnodePort
=
6035
;
// udp/tcp
uint16_t
tsDnodeDnodePort
=
6035
;
// udp/tcp
uint16_t
tsSyncPort
=
6040
;
int32_t
tsStatusInterval
=
1
;
// second
int16_t
tsNumOfVnodesPerCore
=
8
;
int16_t
tsNumOfTotalVnodes
=
TSDB_INVALID_VNODE_NUM
;
int32_t
tsNumOfMnodes
=
3
;
int32_t
tsStatusInterval
=
1
;
// second
int32_t
tsShellActivityTimer
=
3
;
// second
int32_t
tsTableMetaKeepTimer
=
7200
;
// second
// common
int32_t
tsRpcTimer
=
300
;
int32_t
tsRpcMaxTime
=
600
;
// seconds;
int32_t
tsRpcMaxTime
=
600
;
// seconds;
int32_t
tsMaxShellConns
=
5000
;
int32_t
tsMaxConnections
=
5000
;
int32_t
tsShellActivityTimer
=
3
;
// second
float
tsNumOfThreadsPerCore
=
1
.
0
;
float
tsRatioOfQueryThreads
=
0
.
5
;
int16_t
tsNumOfVnodesPerCore
=
8
;
int16_t
tsNumOfTotalVnodes
=
TSDB_INVALID_VNODE_NUM
;
int8_t
tsDaylight
=
0
;
char
tsTimezone
[
64
]
=
{
0
};
char
tsLocale
[
TSDB_LOCALE_LEN
]
=
{
0
};
char
tsCharset
[
TSDB_LOCALE_LEN
]
=
{
0
};
// default encode string
int32_t
tsEnableCoreFile
=
0
;
int32_t
tsMaxBinaryDisplayWidth
=
30
;
#ifdef _TD_ARM_32_
int32_t
tsMaxTablePerVnode
=
100
;
#else
int32_t
tsMaxTablePerVnode
=
TSDB_DEFAULT_TABLES
;
#endif
/*
* denote if the server needs to compress response message at the application layer to client, including query rsp,
* metricmeta rsp, and multi-meter query rsp message body. The client compress the submit message to server.
*
* 0: all data are compressed
* -1: all data are not compressed
* other values: if the message payload size is greater than the tsCompressMsgSize, the message will be compressed.
*/
int32_t
tsCompressMsgSize
=
-
1
;
// client
int32_t
tsTableMetaKeepTimer
=
7200
;
// second
int32_t
tsMaxSQLStringLen
=
TSDB_MAX_SQL_LEN
;
int32_t
tsTscEnableRecordSql
=
0
;
// the maximum number of results for projection query on super table that are returned from
// one virtual node, to order according to timestamp
int32_t
tsMaxNumOfOrderedResults
=
100000
;
// 10 ms for sliding time, the value will changed in case of time precision changed
int32_t
tsMinSlidingTime
=
10
;
// 10 ms for interval time range, changed accordingly
int32_t
tsMinIntervalTime
=
10
;
// 20sec, the maximum value of stream computing delay, changed accordingly
int32_t
tsMaxStreamComputDelay
=
20000
;
// 10sec, the first stream computing delay time after system launched successfully, changed accordingly
int32_t
tsStreamCompStartDelay
=
10000
;
// the stream computing delay time after executing failed, change accordingly
int32_t
tsStreamCompRetryDelay
=
10
;
// The delayed computing ration. 10% of the whole computing time window by default.
float
tsStreamComputDelayRatio
=
0
.
1
;
int32_t
tsProjectExecInterval
=
10000
;
// every 10sec, the projection will be executed once
int64_t
tsMaxRetentWindow
=
24
*
3600L
;
// maximum time window tolerance
// db parameters
int32_t
tsCacheBlockSize
=
TSDB_DEFAULT_CACHE_BLOCK_SIZE
;
int32_t
tsBlocksPerVnode
=
TSDB_DEFAULT_TOTAL_BLOCKS
;
int16_t
tsDaysPerFile
=
TSDB_DEFAULT_DAYS_PER_FILE
;
...
...
@@ -101,27 +110,74 @@ int16_t tsCompression = TSDB_DEFAULT_COMP_LEVEL;
int16_t
tsWAL
=
TSDB_DEFAULT_WAL_LEVEL
;
int32_t
tsReplications
=
TSDB_DEFAULT_REPLICA_NUM
;
/**
* Change the meaning of affected rows:
* 0: affected rows not include those duplicate records
* 1: affected rows include those duplicate records
*/
int16_t
tsAffectedRowsMod
=
0
;
int32_t
tsNumOfMnodes
=
3
;
int32_t
tsMaxShellConns
=
5000
;
int32_t
tsMaxConnections
=
5000
;
#ifdef _TD_ARM_32_
int32_t
tsMaxTablePerVnode
=
100
;
#else
int32_t
tsMaxTablePerVnode
=
TSDB_DEFAULT_TABLES
;
#endif
// balance
int32_t
tsEnableBalance
=
1
;
int32_t
tsAlternativeRole
=
0
;
int32_t
tsBalanceInterval
=
300
;
// seconds
int32_t
tsOfflineThreshold
=
86400
*
100
;
// seconds 10days
int32_t
tsMnodeEqualVnodeNum
=
4
;
int32_t
tsEnableHttpModule
=
1
;
int32_t
tsEnableMqttModule
=
0
;
// not finished yet, not started it by default
// restful
int32_t
tsEnableHttpModule
=
1
;
int32_t
tsRestRowLimit
=
10240
;
uint16_t
tsHttpPort
=
6020
;
// only tcp, range tcp[6020]
int32_t
tsHttpCacheSessions
=
100
;
int32_t
tsHttpSessionExpire
=
36000
;
int32_t
tsHttpMaxThreads
=
2
;
int32_t
tsHttpEnableCompress
=
0
;
int32_t
tsHttpEnableRecordSql
=
0
;
int32_t
tsTelegrafUseFieldNum
=
0
;
// mqtt
int32_t
tsEnableMqttModule
=
0
;
// not finished yet, not started it by default
char
tsMqttBrokerAddress
[
128
]
=
{
0
};
char
tsMqttBrokerClientId
[
128
]
=
{
0
};
// monitor
int32_t
tsEnableMonitorModule
=
0
;
char
tsMonitorDbName
[
TSDB_DB_NAME_LEN
]
=
"log"
;
char
tsInternalPass
[]
=
"secretkey"
;
int32_t
tsMonitorInterval
=
30
;
// seconds
int32_t
tsRestRowLimit
=
10240
;
int32_t
tsMaxSQLStringLen
=
TSDB_MAX_SQL_LEN
;
// internal
int32_t
tscEmbedded
=
0
;
char
configDir
[
TSDB_FILENAME_LEN
]
=
"/etc/taos"
;
char
tsVnodeDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsDnodeDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsMnodeDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsDataDir
[
TSDB_FILENAME_LEN
]
=
"/var/lib/taos"
;
char
tsScriptDir
[
TSDB_FILENAME_LEN
]
=
"/etc/taos"
;
/*
* minimum scale for whole system, millisecond by default
* for TSDB_TIME_PRECISION_MILLI: 86400000L
* TSDB_TIME_PRECISION_MICRO: 86400000000L
* TSDB_TIME_PRECISION_NANO: 86400000000000L
*/
int64_t
tsMsPerDay
[]
=
{
86400000L
,
86400000000L
,
86400000000000L
};
// system info
char
tsOsName
[
10
]
=
"Linux"
;
int64_t
tsPageSize
;
int64_t
tsOpenMax
;
int64_t
tsStreamMax
;
int32_t
tsNumOfCores
=
1
;
float
tsTotalTmpDirGB
=
0
;
float
tsTotalDataDirGB
=
0
;
float
tsAvailTmpDirGB
=
0
;
float
tsAvailDataDirGB
=
0
;
float
tsMinimalTmpDirGB
=
0
.
1
;
float
tsMinimalDataDirGB
=
0
.
5
;
int32_t
tsTotalMemoryMB
=
0
;
int32_t
tsVersion
=
0
;
// log
int32_t
tsNumOfLogLines
=
10000000
;
int32_t
mDebugFlag
=
135
;
int32_t
sdbDebugFlag
=
135
;
...
...
@@ -140,69 +196,6 @@ int32_t debugFlag = 131;
int32_t
sDebugFlag
=
135
;
int32_t
tsdbDebugFlag
=
135
;
// the maximum number of results for projection query on super table that are returned from
// one virtual node, to order according to timestamp
int32_t
tsMaxNumOfOrderedResults
=
100000
;
/*
* denote if the server needs to compress response message at the application layer to client, including query rsp,
* metricmeta rsp, and multi-meter query rsp message body. The client compress the submit message to server.
*
* 0: all data are compressed
* -1: all data are not compressed
* other values: if the message payload size is greater than the tsCompressMsgSize, the message will be compressed.
*/
int32_t
tsCompressMsgSize
=
-
1
;
// use UDP by default[option: udp, tcp]
char
tsSocketType
[
4
]
=
"udp"
;
// 10 ms for sliding time, the value will changed in case of time precision changed
int32_t
tsMinSlidingTime
=
10
;
// 10 ms for interval time range, changed accordingly
int32_t
tsMinIntervalTime
=
10
;
// 20sec, the maximum value of stream computing delay, changed accordingly
int32_t
tsMaxStreamComputDelay
=
20000
;
// 10sec, the first stream computing delay time after system launched successfully, changed accordingly
int32_t
tsStreamCompStartDelay
=
10000
;
// the stream computing delay time after executing failed, change accordingly
int32_t
tsStreamCompRetryDelay
=
10
;
// The delayed computing ration. 10% of the whole computing time window by default.
float
tsStreamComputDelayRatio
=
0
.
1
;
int32_t
tsProjectExecInterval
=
10000
;
// every 10sec, the projection will be executed once
int64_t
tsMaxRetentWindow
=
24
*
3600L
;
// maximum time window tolerance
uint16_t
tsHttpPort
=
6020
;
// only tcp, range tcp[6020]
// uint16_t tsNginxPort = 6060; //only tcp, range tcp[6060]
int32_t
tsHttpCacheSessions
=
100
;
int32_t
tsHttpSessionExpire
=
36000
;
int32_t
tsHttpMaxThreads
=
2
;
int32_t
tsHttpEnableCompress
=
0
;
int32_t
tsHttpEnableRecordSql
=
0
;
int32_t
tsTelegrafUseFieldNum
=
0
;
int32_t
tsTscEnableRecordSql
=
0
;
uint32_t
tsPublicIpInt
=
0
;
char
tsMonitorDbName
[
TSDB_DB_NAME_LEN
]
=
"log"
;
char
tsInternalPass
[]
=
"secretkey"
;
int32_t
tsMonitorInterval
=
30
;
// seconds
int8_t
tsDaylight
=
0
;
char
tsTimezone
[
64
]
=
{
0
};
char
tsLocale
[
TSDB_LOCALE_LEN
]
=
{
0
};
char
tsCharset
[
TSDB_LOCALE_LEN
]
=
{
0
};
// default encode string
char
tsMqttBrokerAddress
[
128
]
=
{
0
};
char
tsMqttBrokerClientId
[
128
]
=
{
0
};
int32_t
tsMaxBinaryDisplayWidth
=
30
;
static
pthread_once_t
tsInitGlobalCfgOnce
=
PTHREAD_ONCE_INIT
;
void
taosSetAllDebugFlag
()
{
...
...
@@ -426,6 +419,16 @@ static void doInitGlobalConfig() {
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"balance"
;
cfg
.
ptr
=
&
tsEnableBalance
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
cfg
.
ptrLength
=
1
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"balanceInterval"
;
cfg
.
ptr
=
&
tsBalanceInterval
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
...
...
@@ -447,19 +450,9 @@ static void doInitGlobalConfig() {
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"affectedRowsMod"
;
cfg
.
ptr
=
&
tsAffectedRowsMod
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT16
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_LOG
|
TSDB_CFG_CTYPE_B_CLIENT
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
cfg
.
ptrLength
=
0
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
// timer
cfg
.
option
=
"maxTmrCtrl"
;
cfg
.
ptr
=
&
t
ao
sMaxTmrCtrl
;
cfg
.
ptr
=
&
tsMaxTmrCtrl
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
8
;
...
...
@@ -669,16 +662,6 @@ static void doInitGlobalConfig() {
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"ctime"
;
cfg
.
ptr
=
&
tsCommitTime
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT16
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
TSDB_MIN_COMMIT_TIME
;
cfg
.
maxValue
=
TSDB_MAX_COMMIT_TIME
;
cfg
.
ptrLength
=
0
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_SECOND
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"comp"
;
cfg
.
ptr
=
&
tsCompression
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT16
;
...
...
@@ -729,17 +712,6 @@ static void doInitGlobalConfig() {
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
// socket type; udp by default
cfg
.
option
=
"sockettype"
;
cfg
.
ptr
=
tsSocketType
;
cfg
.
valType
=
TAOS_CFG_VTYPE_STRING
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_CLIENT
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
0
;
cfg
.
ptrLength
=
3
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"compressMsgSize"
;
cfg
.
ptr
=
&
tsCompressMsgSize
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
...
...
@@ -873,7 +845,6 @@ static void doInitGlobalConfig() {
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"mqtt"
;
cfg
.
ptr
=
&
tsEnableMqttModule
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
...
...
@@ -894,16 +865,6 @@ static void doInitGlobalConfig() {
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"monitorDbName"
;
cfg
.
ptr
=
tsMonitorDbName
;
cfg
.
valType
=
TAOS_CFG_VTYPE_STRING
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
0
;
cfg
.
ptrLength
=
TSDB_DB_NAME_LEN
-
1
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
// http configs
cfg
.
option
=
"httpCacheSessions"
;
cfg
.
ptr
=
&
tsHttpCacheSessions
;
...
...
@@ -955,16 +916,6 @@ static void doInitGlobalConfig() {
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"httpEnableCompress"
;
cfg
.
ptr
=
&
tsHttpEnableCompress
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
cfg
.
ptrLength
=
1
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
// debug flag
cfg
.
option
=
"numOfLogLines"
;
cfg
.
ptr
=
&
tsNumOfLogLines
;
...
...
src/inc/taos.h
浏览文件 @
72cb0421
...
...
@@ -48,7 +48,6 @@ typedef enum {
TSDB_OPTION_TIMEZONE
,
TSDB_OPTION_CONFIGDIR
,
TSDB_OPTION_SHELL_ACTIVITY_TIMER
,
TSDB_OPTION_SOCKET_TYPE
,
TSDB_MAX_OPTIONS
}
TSDB_OPTION
;
...
...
src/inc/tbalance.h
浏览文件 @
72cb0421
...
...
@@ -25,8 +25,8 @@ struct SDnodeObj;
int32_t
balanceInit
();
void
balanceCleanUp
();
void
balanceNotify
();
void
balance
UpdateMnode
();
void
balance
Async
Notify
();
void
balance
SyncNotify
();
void
balanceReset
();
int32_t
balanceAllocVnodes
(
struct
SVgObj
*
pVgroup
);
int32_t
balanceDropDnode
(
struct
SDnodeObj
*
pDnode
);
...
...
src/mnode/src/mnodeBalance.c
浏览文件 @
72cb0421
...
...
@@ -25,8 +25,8 @@
int32_t
balanceInit
()
{
return
TSDB_CODE_SUCCESS
;
}
void
balanceCleanUp
()
{}
void
balanceNotify
()
{}
void
balance
UpdateMnode
()
{}
void
balance
Async
Notify
()
{}
void
balance
SyncNotify
()
{}
void
balanceReset
()
{}
int32_t
balanceAllocVnodes
(
SVgObj
*
pVgroup
)
{
...
...
src/mnode/src/mnodeDb.c
浏览文件 @
72cb0421
...
...
@@ -910,7 +910,7 @@ static int32_t mnodeAlterDbCb(SMnodeMsg *pMsg, int32_t code) {
mTrace
(
"db:%s, all vgroups is altered"
,
pDb
->
name
);
mLPrint
(
"db:%s, is alterd by %s"
,
pDb
->
name
,
mnodeGetUserFromMsg
(
pMsg
));
balanceNotify
();
balance
Async
Notify
();
return
TSDB_CODE_SUCCESS
;
}
...
...
src/mnode/src/mnodeDnode.c
浏览文件 @
72cb0421
...
...
@@ -81,7 +81,7 @@ static int32_t mnodeDnodeActionDelete(SSdbOper *pOper) {
mnodeDropAllDnodeVgroups
(
pDnode
);
#endif
mnodeDropMnodeLocal
(
pDnode
->
dnodeId
);
balanceNotify
();
balance
Async
Notify
();
mTrace
(
"dnode:%d, all vgroups is dropped from sdb"
,
pDnode
->
dnodeId
);
return
TSDB_CODE_SUCCESS
;
...
...
@@ -382,8 +382,8 @@ static int32_t mnodeProcessDnodeStatusMsg(SMnodeMsg *pMsg) {
mTrace
(
"dnode:%d, from offline to online"
,
pDnode
->
dnodeId
);
pDnode
->
status
=
TAOS_DN_STATUS_READY
;
balance
UpdateMnode
();
balanceNotify
();
balance
SyncNotify
();
balance
Async
Notify
();
}
if
(
openVnodes
!=
pDnode
->
openVnodes
)
{
...
...
src/util/inc/ttimer.h
浏览文件 @
72cb0421
...
...
@@ -24,7 +24,7 @@ typedef void *tmr_h;
typedef
void
(
*
TAOS_TMR_CALLBACK
)(
void
*
,
void
*
);
extern
int
taosTmrThreads
;
extern
uint32_t
t
ao
sMaxTmrCtrl
;
extern
uint32_t
tsMaxTmrCtrl
;
#define MSECONDS_PER_TICK 5
...
...
src/util/src/ttimer.c
浏览文件 @
72cb0421
...
...
@@ -90,7 +90,7 @@ typedef struct time_wheel_t {
}
time_wheel_t
;
int32_t
tmrDebugFlag
=
131
;
uint32_t
t
ao
sMaxTmrCtrl
=
512
;
uint32_t
tsMaxTmrCtrl
=
512
;
static
pthread_once_t
tmrModuleInit
=
PTHREAD_ONCE_INIT
;
static
pthread_mutex_t
tmrCtrlMutex
;
...
...
@@ -492,17 +492,17 @@ bool taosTmrReset(TAOS_TMR_CALLBACK fp, int mseconds, void* param, void* handle,
}
static
void
taosTmrModuleInit
(
void
)
{
tmrCtrls
=
malloc
(
sizeof
(
tmr_ctrl_t
)
*
t
ao
sMaxTmrCtrl
);
tmrCtrls
=
malloc
(
sizeof
(
tmr_ctrl_t
)
*
tsMaxTmrCtrl
);
if
(
tmrCtrls
==
NULL
)
{
tmrError
(
"failed to allocate memory for timer controllers."
);
return
;
}
for
(
int
i
=
0
;
i
<
t
ao
sMaxTmrCtrl
-
1
;
++
i
)
{
for
(
int
i
=
0
;
i
<
tsMaxTmrCtrl
-
1
;
++
i
)
{
tmr_ctrl_t
*
ctrl
=
tmrCtrls
+
i
;
ctrl
->
next
=
ctrl
+
1
;
}
(
tmrCtrls
+
t
ao
sMaxTmrCtrl
-
1
)
->
next
=
NULL
;
(
tmrCtrls
+
tsMaxTmrCtrl
-
1
)
->
next
=
NULL
;
unusedTmrCtrl
=
tmrCtrls
;
pthread_mutex_init
(
&
tmrCtrlMutex
,
NULL
);
...
...
tests/script/general/table/autocreate.sim
浏览文件 @
72cb0421
...
...
@@ -28,10 +28,10 @@ sql insert into db.c1 using db.st1 tags(1) values(now, 1);
sql insert into db.c2 using db.st1 tags(2) values(now, 2);
sql insert into db.c3 using db.st1 tags(3) values(now, 3);
sql insert into db.c4 using db.st1 tags(4) values(now, 4);
sql insert into db.c1 using db.st1 tags(1) values(now, 1);
sql insert into db.c2 using db.st1 tags(2) values(now, 2);
sql insert into db.c3 using db.st1 tags(3) values(now, 3);
sql insert into db.c4 using db.st1 tags(4) values(now, 4);
sql insert into db.c1 using db.st1 tags(1) values(now
+1s
, 1);
sql insert into db.c2 using db.st1 tags(2) values(now
+1s
, 2);
sql insert into db.c3 using db.st1 tags(3) values(now
+1s
, 3);
sql insert into db.c4 using db.st1 tags(4) values(now
+1s
, 4);
sql show db.tables
if $rows != 4 then
...
...
@@ -68,14 +68,14 @@ sql insert into db.s1 using db.st2 tags(1, 1, 1) values(now, 1, 2);
sql insert into db.s2 using db.st2 tags(2, 2, 2) values(now, 2, 3);
sql insert into db.s3 using db.st2 tags(3, 3, 3) values(now, 3, 4);
sql insert into db.s4 using db.st2 tags(4, 4, 4) values(now, 4, 5);
sql insert into db.s1 using db.st2 tags(1, 1, 1) values(now, 1, 2);
sql insert into db.s2 using db.st2 tags(2, 2, 2) values(now, 2, 3);
sql insert into db.s3 using db.st2 tags(3, 3, 3) values(now, 3, 4);
sql insert into db.s4 using db.st2 tags(4, 4, 4) values(now, 4, 5);
sql insert into db.s1 using db.st2 tags(1, 1, 1) values(now, 1, 2);
sql insert into db.s2 using db.st2 tags(2, 2, 2) values(now, 2, 3);
sql insert into db.s3 using db.st2 tags(3, 3, 3) values(now, 3, 4);
sql insert into db.s4 using db.st2 tags(4, 4, 4) values(now, 4, 5);
sql insert into db.s1 using db.st2 tags(1, 1, 1) values(now
+1s
, 1, 2);
sql insert into db.s2 using db.st2 tags(2, 2, 2) values(now
+1s
, 2, 3);
sql insert into db.s3 using db.st2 tags(3, 3, 3) values(now
+1s
, 3, 4);
sql insert into db.s4 using db.st2 tags(4, 4, 4) values(now
+1s
, 4, 5);
sql insert into db.s1 using db.st2 tags(1, 1, 1) values(now
+2s
, 1, 2);
sql insert into db.s2 using db.st2 tags(2, 2, 2) values(now
+2s
, 2, 3);
sql insert into db.s3 using db.st2 tags(3, 3, 3) values(now
+2s
, 3, 4);
sql insert into db.s4 using db.st2 tags(4, 4, 4) values(now
+2s
, 4, 5);
sql show db.tables
if $rows != 8 then
...
...
tests/script/jenkins/basic.txt
浏览文件 @
72cb0421
...
...
@@ -155,6 +155,7 @@ cd ../../../debug; make
./test.sh -f general/stable/disk.sim
./test.sh -f general/stable/dnode3.sim
./test.sh -f general/stable/metrics.sim
./test.sh -f general/stable/refcount.sim
./test.sh -f general/stable/show.sim
./test.sh -f general/stable/values.sim
./test.sh -f general/stable/vnode3.sim
...
...
tests/script/jenkins/bug.txt
0 → 100644
浏览文件 @
72cb0421
因为 它太大了无法显示 source diff 。你可以改为
查看blob
。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录