Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
~笨蛋陪你哭
TDengine
提交
f8adfac4
T
TDengine
项目概览
~笨蛋陪你哭
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
1
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f8adfac4
编写于
12月 26, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
adjust log
上级
033b15cb
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
150 addition
and
93 deletion
+150
-93
src/client/inc/tscLog.h
src/client/inc/tscLog.h
+2
-2
src/common/inc/tglobal.h
src/common/inc/tglobal.h
+29
-28
src/common/inc/tulog.h
src/common/inc/tulog.h
+1
-1
src/common/src/tglobal.c
src/common/src/tglobal.c
+59
-48
src/dnode/src/dnodeVnodes.c
src/dnode/src/dnodeVnodes.c
+7
-3
src/inc/taosmsg.h
src/inc/taosmsg.h
+5
-1
src/mnode/inc/mnodeDnode.h
src/mnode/inc/mnodeDnode.h
+3
-0
src/mnode/src/mnodeDnode.c
src/mnode/src/mnodeDnode.c
+17
-4
src/query/inc/queryLog.h
src/query/inc/queryLog.h
+2
-2
src/rpc/inc/rpcLog.h
src/rpc/inc/rpcLog.h
+1
-1
src/tsdb/inc/tsdbMain.h
src/tsdb/inc/tsdbMain.h
+1
-1
src/util/inc/tconfig.h
src/util/inc/tconfig.h
+1
-0
src/util/src/tconfig.c
src/util/src/tconfig.c
+20
-0
src/util/src/tlog.c
src/util/src/tlog.c
+1
-1
src/util/src/ttimer.c
src/util/src/ttimer.c
+1
-1
未找到文件。
src/client/inc/tscLog.h
浏览文件 @
f8adfac4
...
...
@@ -22,8 +22,8 @@ extern "C" {
#include "tlog.h"
extern
u
int32_t
cDebugFlag
;
extern
uint32_t
tscEmbedded
;
extern
int32_t
cDebugFlag
;
extern
int8_t
tscEmbedded
;
#define tscFatal(...) do { if (cDebugFlag & DEBUG_FATAL) { taosPrintLog("TSC FATAL ", tscEmbedded ? 255 : cDebugFlag, __VA_ARGS__); }} while(0)
#define tscError(...) do { if (cDebugFlag & DEBUG_ERROR) { taosPrintLog("TSC ERROR ", tscEmbedded ? 255 : cDebugFlag, __VA_ARGS__); }} while(0)
...
...
src/common/inc/tglobal.h
浏览文件 @
f8adfac4
...
...
@@ -32,8 +32,8 @@ extern uint16_t tsSyncPort;
extern
uint16_t
tsArbitratorPort
;
extern
int32_t
tsStatusInterval
;
extern
int32_t
tsNumOfMnodes
;
extern
int
32_t
tsEnableVnodeBak
;
extern
int
32_t
tsEnableTelemetryReporting
;
extern
int
8_t
tsEnableVnodeBak
;
extern
int
8_t
tsEnableTelemetryReporting
;
extern
char
tsEmail
[];
extern
char
tsArbitrator
[];
...
...
@@ -51,7 +51,7 @@ extern int8_t tsDaylight;
extern
char
tsTimezone
[];
extern
char
tsLocale
[];
extern
char
tsCharset
[];
// default encode string
extern
int
32_t
tsEnableCoreFile
;
extern
int
8_t
tsEnableCoreFile
;
extern
int32_t
tsCompressMsgSize
;
extern
char
tsTempDir
[];
...
...
@@ -59,12 +59,12 @@ extern char tsTempDir[];
extern
int32_t
tsQueryBufferSize
;
// maximum allowed usage buffer for each data node during query processing
extern
int32_t
tsRetrieveBlockingModel
;
// retrieve threads will be blocked
extern
int
32_t
tsKeepOriginalColumnName
;
extern
int
8_t
tsKeepOriginalColumnName
;
// client
extern
int32_t
tsTableMetaKeepTimer
;
extern
int32_t
tsMaxSQLStringLen
;
extern
int
32_t
tsTscEnableRecordSql
;
extern
int
8_t
tsTscEnableRecordSql
;
extern
int32_t
tsMaxNumOfOrderedResults
;
extern
int32_t
tsMinSlidingTime
;
extern
int32_t
tsMinIntervalTime
;
...
...
@@ -93,49 +93,50 @@ extern int16_t tsWAL;
extern
int32_t
tsFsyncPeriod
;
extern
int32_t
tsReplications
;
extern
int32_t
tsQuorum
;
extern
int
32_t
tsUpdate
;
extern
int
8_t
tsUpdate
;
// balance
extern
int
32_t
tsEnableBalance
;
extern
int
32_t
tsAlternativeRole
;
extern
int
8_t
tsEnableBalance
;
extern
int
8_t
tsAlternativeRole
;
extern
int32_t
tsBalanceInterval
;
extern
int32_t
tsOfflineThreshold
;
extern
int32_t
tsMnodeEqualVnodeNum
;
extern
int32_t
tsEnableFlowCtrl
;
extern
int32_t
tsEnableSlaveQuery
;
extern
int8_t
tsEnableFlowCtrl
;
extern
int8_t
tsEnableSlaveQuery
;
extern
int8_t
tsEnableAdjustMaster
;
// restful
extern
int
32_t
tsEnableHttpModule
;
extern
int
8_t
tsEnableHttpModule
;
extern
int32_t
tsRestRowLimit
;
extern
uint16_t
tsHttpPort
;
extern
int32_t
tsHttpCacheSessions
;
extern
int32_t
tsHttpSessionExpire
;
extern
int32_t
tsHttpMaxThreads
;
extern
int
32_t
tsHttpEnableCompress
;
extern
int
32_t
tsHttpEnableRecordSql
;
extern
int
32_t
tsTelegrafUseFieldNum
;
extern
int
8_t
tsHttpEnableCompress
;
extern
int
8_t
tsHttpEnableRecordSql
;
extern
int
8_t
tsTelegrafUseFieldNum
;
// mqtt
extern
int
32
_t
tsEnableMqttModule
;
extern
char
tsMqttHostName
[];
extern
char
tsMqttPort
[];
extern
char
tsMqttUser
[];
extern
char
tsMqttPass
[];
extern
char
tsMqttClientId
[];
extern
char
tsMqttTopic
[];
extern
int
8
_t
tsEnableMqttModule
;
extern
char
tsMqttHostName
[];
extern
char
tsMqttPort
[];
extern
char
tsMqttUser
[];
extern
char
tsMqttPass
[];
extern
char
tsMqttClientId
[];
extern
char
tsMqttTopic
[];
// monitor
extern
int
32_t
tsEnableMonitorModule
;
extern
int
8_t
tsEnableMonitorModule
;
extern
char
tsMonitorDbName
[];
extern
char
tsInternalPass
[];
extern
int32_t
tsMonitorInterval
;
// stream
extern
int
32
_t
tsEnableStream
;
extern
int
8
_t
tsEnableStream
;
// internal
extern
int
32_t
tsPrintAuth
;
extern
uint32_t
tscEmbedded
;
extern
int
8_t
tsPrintAuth
;
extern
int8_t
tscEmbedded
;
extern
char
configDir
[];
extern
char
tsVnodeDir
[];
extern
char
tsDnodeDir
[];
...
...
@@ -172,13 +173,13 @@ extern char gitinfoOfInternal[];
extern
char
buildinfo
[];
// log
extern
int
32_t
tsAsyncLog
;
extern
int
8_t
tsAsyncLog
;
extern
int32_t
tsNumOfLogLines
;
extern
int32_t
tsLogKeepDays
;
extern
int32_t
dDebugFlag
;
extern
int32_t
vDebugFlag
;
extern
int32_t
mDebugFlag
;
extern
u
int32_t
cDebugFlag
;
extern
int32_t
cDebugFlag
;
extern
int32_t
jniDebugFlag
;
extern
int32_t
tmrDebugFlag
;
extern
int32_t
sdbDebugFlag
;
...
...
@@ -188,7 +189,7 @@ extern int32_t monDebugFlag;
extern
int32_t
uDebugFlag
;
extern
int32_t
rpcDebugFlag
;
extern
int32_t
odbcDebugFlag
;
extern
u
int32_t
qDebugFlag
;
extern
int32_t
qDebugFlag
;
extern
int32_t
wDebugFlag
;
extern
int32_t
cqDebugFlag
;
extern
int32_t
debugFlag
;
...
...
src/common/inc/tulog.h
浏览文件 @
f8adfac4
...
...
@@ -23,7 +23,7 @@ extern "C" {
#include "tlog.h"
extern
int32_t
uDebugFlag
;
extern
uint32_t
tscEmbedded
;
extern
int8_t
tscEmbedded
;
#define uFatal(...) { if (uDebugFlag & DEBUG_FATAL) { taosPrintLog("UTL FATAL", tscEmbedded ? 255 : uDebugFlag, __VA_ARGS__); }}
#define uError(...) { if (uDebugFlag & DEBUG_ERROR) { taosPrintLog("UTL ERROR ", tscEmbedded ? 255 : uDebugFlag, __VA_ARGS__); }}
...
...
src/common/src/tglobal.c
浏览文件 @
f8adfac4
...
...
@@ -39,8 +39,8 @@ uint16_t tsSyncPort = 6040;
uint16_t
tsArbitratorPort
=
6042
;
int32_t
tsStatusInterval
=
1
;
// second
int32_t
tsNumOfMnodes
=
3
;
int
32_t
tsEnableVnodeBak
=
1
;
int
32_t
tsEnableTelemetryReporting
=
1
;
int
8_t
tsEnableVnodeBak
=
1
;
int
8_t
tsEnableTelemetryReporting
=
1
;
char
tsEmail
[
TSDB_FQDN_LEN
]
=
{
0
};
// common
...
...
@@ -56,7 +56,7 @@ int8_t tsDaylight = 0;
char
tsTimezone
[
TSDB_TIMEZONE_LEN
]
=
{
0
};
char
tsLocale
[
TSDB_LOCALE_LEN
]
=
{
0
};
char
tsCharset
[
TSDB_LOCALE_LEN
]
=
{
0
};
// default encode string
int
32_t
tsEnableCoreFile
=
0
;
int
8_t
tsEnableCoreFile
=
0
;
int32_t
tsMaxBinaryDisplayWidth
=
30
;
char
tsTempDir
[
TSDB_FILENAME_LEN
]
=
"/tmp/"
;
...
...
@@ -73,7 +73,7 @@ int32_t tsCompressMsgSize = -1;
// client
int32_t
tsTableMetaKeepTimer
=
7200
;
// second
int32_t
tsMaxSQLStringLen
=
TSDB_MAX_SQL_LEN
;
int
32_t
tsTscEnableRecordSql
=
0
;
int
8_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
...
...
@@ -110,7 +110,7 @@ int32_t tsQueryBufferSize = -1;
int32_t
tsRetrieveBlockingModel
=
0
;
// last_row(*), first(*), last_row(ts, col1, col2) query, the result fields will be the original column name
int
32_t
tsKeepOriginalColumnName
=
0
;
int
8_t
tsKeepOriginalColumnName
=
0
;
// db parameters
int32_t
tsCacheBlockSize
=
TSDB_DEFAULT_CACHE_BLOCK_SIZE
;
...
...
@@ -126,34 +126,35 @@ int16_t tsWAL = TSDB_DEFAULT_WAL_LEVEL;
int32_t
tsFsyncPeriod
=
TSDB_DEFAULT_FSYNC_PERIOD
;
int32_t
tsReplications
=
TSDB_DEFAULT_DB_REPLICA_OPTION
;
int32_t
tsQuorum
=
TSDB_DEFAULT_DB_QUORUM_OPTION
;
int
32_t
tsUpdate
=
TSDB_DEFAULT_DB_UPDATE_OPTION
;
int
8_t
tsUpdate
=
TSDB_DEFAULT_DB_UPDATE_OPTION
;
int32_t
tsMaxVgroupsPerDb
=
0
;
int32_t
tsMinTablePerVnode
=
TSDB_TABLES_STEP
;
int32_t
tsMaxTablePerVnode
=
TSDB_DEFAULT_TABLES
;
int32_t
tsTableIncStepPerVnode
=
TSDB_TABLES_STEP
;
// balance
int
32_t
tsEnableBalance
=
1
;
int
32_t
tsAlternativeRole
=
0
;
int32_t
tsBalanceInterval
=
300
;
// seconds
int32_t
tsOfflineThreshold
=
86400
*
100
;
// seconds 10days
int
8_t
tsEnableBalance
=
1
;
int
8_t
tsAlternativeRole
=
0
;
int32_t
tsBalanceInterval
=
300
;
// seconds
int32_t
tsOfflineThreshold
=
86400
*
100
;
// seconds 10days
int32_t
tsMnodeEqualVnodeNum
=
4
;
int32_t
tsEnableFlowCtrl
=
1
;
int32_t
tsEnableSlaveQuery
=
1
;
int8_t
tsEnableFlowCtrl
=
1
;
int8_t
tsEnableSlaveQuery
=
1
;
int8_t
tsEnableAdjustMaster
=
1
;
// restful
int
32_t
tsEnableHttpModule
=
1
;
int
8_t
tsEnableHttpModule
=
1
;
int32_t
tsRestRowLimit
=
10240
;
uint16_t
tsHttpPort
=
6041
;
// only tcp, range tcp[6041]
int32_t
tsHttpCacheSessions
=
1000
;
int32_t
tsHttpSessionExpire
=
36000
;
int32_t
tsHttpMaxThreads
=
2
;
int
32_t
tsHttpEnableCompress
=
1
;
int
32_t
tsHttpEnableRecordSql
=
0
;
int
32_t
tsTelegrafUseFieldNum
=
0
;
int
8_t
tsHttpEnableCompress
=
1
;
int
8_t
tsHttpEnableRecordSql
=
0
;
int
8_t
tsTelegrafUseFieldNum
=
0
;
// mqtt
int
32
_t
tsEnableMqttModule
=
0
;
// not finished yet, not started it by default
int
8
_t
tsEnableMqttModule
=
0
;
// not finished yet, not started it by default
char
tsMqttHostName
[
TSDB_MQTT_HOSTNAME_LEN
]
=
"test.mosquitto.org"
;
char
tsMqttPort
[
TSDB_MQTT_PORT_LEN
]
=
"1883"
;
char
tsMqttUser
[
TSDB_MQTT_USER_LEN
]
=
{
0
};
...
...
@@ -162,24 +163,24 @@ char tsMqttClientId[TSDB_MQTT_CLIENT_ID_LEN] = "TDengineMqttSubscriber";
char
tsMqttTopic
[
TSDB_MQTT_TOPIC_LEN
]
=
"/test"
;
// #
// monitor
int
32_t
tsEnableMonitorModule
=
1
;
int
8_t
tsEnableMonitorModule
=
1
;
char
tsMonitorDbName
[
TSDB_DB_NAME_LEN
]
=
"log"
;
char
tsInternalPass
[]
=
"secretkey"
;
int32_t
tsMonitorInterval
=
30
;
// seconds
// stream
int
32_t
tsEnableStream
=
1
;
int
8_t
tsEnableStream
=
1
;
// internal
int
32
_t
tsPrintAuth
=
0
;
uint32
_t
tscEmbedded
=
0
;
char
configDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsVnodeDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsDnodeDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsMnodeDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsDataDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsScriptDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsVnodeBakDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
int
8
_t
tsPrintAuth
=
0
;
int8
_t
tscEmbedded
=
0
;
char
configDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsVnodeDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsDnodeDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsMnodeDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsDataDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsScriptDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
char
tsVnodeBakDir
[
TSDB_FILENAME_LEN
]
=
{
0
};
/*
* minimum scale for whole system, millisecond by default
...
...
@@ -210,19 +211,19 @@ int32_t mDebugFlag = 131;
int32_t
sdbDebugFlag
=
131
;
int32_t
dDebugFlag
=
135
;
int32_t
vDebugFlag
=
135
;
u
int32_t
cDebugFlag
=
131
;
int32_t
cDebugFlag
=
131
;
int32_t
jniDebugFlag
=
131
;
int32_t
odbcDebugFlag
=
131
;
int32_t
httpDebugFlag
=
131
;
int32_t
mqttDebugFlag
=
131
;
int32_t
monDebugFlag
=
131
;
u
int32_t
qDebugFlag
=
131
;
int32_t
qDebugFlag
=
131
;
int32_t
rpcDebugFlag
=
131
;
int32_t
uDebugFlag
=
131
;
int32_t
debugFlag
=
0
;
int32_t
sDebugFlag
=
135
;
int32_t
wDebugFlag
=
135
;
u
int32_t
tsdbDebugFlag
=
131
;
int32_t
tsdbDebugFlag
=
131
;
int32_t
cqDebugFlag
=
131
;
int32_t
(
*
monStartSystemFp
)()
=
NULL
;
...
...
@@ -469,7 +470,7 @@ static void doInitGlobalConfig(void) {
cfg
.
option
=
"vnodeBak"
;
cfg
.
ptr
=
&
tsEnableVnodeBak
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
...
...
@@ -479,7 +480,7 @@ static void doInitGlobalConfig(void) {
cfg
.
option
=
"telemetryReporting"
;
cfg
.
ptr
=
&
tsEnableTelemetryReporting
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
...
...
@@ -489,7 +490,7 @@ static void doInitGlobalConfig(void) {
cfg
.
option
=
"balance"
;
cfg
.
ptr
=
&
tsEnableBalance
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
...
...
@@ -510,7 +511,7 @@ static void doInitGlobalConfig(void) {
// 0-any; 1-mnode; 2-vnode
cfg
.
option
=
"role"
;
cfg
.
ptr
=
&
tsAlternativeRole
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
2
;
...
...
@@ -812,7 +813,7 @@ static void doInitGlobalConfig(void) {
cfg
.
option
=
"update"
;
cfg
.
ptr
=
&
tsUpdate
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
TSDB_MIN_DB_UPDATE
;
cfg
.
maxValue
=
TSDB_MAX_DB_UPDATE
;
...
...
@@ -902,7 +903,7 @@ static void doInitGlobalConfig(void) {
cfg
.
option
=
"keepColumnName"
;
cfg
.
ptr
=
&
tsKeepOriginalColumnName
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
|
TSDB_CFG_CTYPE_B_CLIENT
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
...
...
@@ -1006,7 +1007,7 @@ static void doInitGlobalConfig(void) {
// module configs
cfg
.
option
=
"flowctrl"
;
cfg
.
ptr
=
&
tsEnableFlowCtrl
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
...
...
@@ -1016,7 +1017,17 @@ static void doInitGlobalConfig(void) {
cfg
.
option
=
"slaveQuery"
;
cfg
.
ptr
=
&
tsEnableSlaveQuery
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
cfg
.
ptrLength
=
0
;
cfg
.
unitType
=
TAOS_CFG_UTYPE_NONE
;
taosInitConfigOption
(
cfg
);
cfg
.
option
=
"adjustMaster"
;
cfg
.
ptr
=
&
tsEnableAdjustMaster
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
...
...
@@ -1026,7 +1037,7 @@ static void doInitGlobalConfig(void) {
cfg
.
option
=
"http"
;
cfg
.
ptr
=
&
tsEnableHttpModule
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
...
...
@@ -1036,7 +1047,7 @@ static void doInitGlobalConfig(void) {
cfg
.
option
=
"mqtt"
;
cfg
.
ptr
=
&
tsEnableMqttModule
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
...
...
@@ -1046,7 +1057,7 @@ static void doInitGlobalConfig(void) {
cfg
.
option
=
"monitor"
;
cfg
.
ptr
=
&
tsEnableMonitorModule
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
...
...
@@ -1056,7 +1067,7 @@ static void doInitGlobalConfig(void) {
cfg
.
option
=
"stream"
;
cfg
.
ptr
=
&
tsEnableStream
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
...
...
@@ -1066,7 +1077,7 @@ static void doInitGlobalConfig(void) {
cfg
.
option
=
"httpEnableRecordSql"
;
cfg
.
ptr
=
&
tsHttpEnableRecordSql
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
...
...
@@ -1076,7 +1087,7 @@ static void doInitGlobalConfig(void) {
cfg
.
option
=
"telegrafUseFieldNum"
;
cfg
.
ptr
=
&
tsTelegrafUseFieldNum
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_SHOW
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
...
...
@@ -1127,7 +1138,7 @@ static void doInitGlobalConfig(void) {
cfg
.
option
=
"asyncLog"
;
cfg
.
ptr
=
&
tsAsyncLog
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
16
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
|
TSDB_CFG_CTYPE_B_LOG
|
TSDB_CFG_CTYPE_B_CLIENT
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
...
...
@@ -1328,7 +1339,7 @@ static void doInitGlobalConfig(void) {
cfg
.
option
=
"enableRecordSql"
;
cfg
.
ptr
=
&
tsTscEnableRecordSql
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
...
...
@@ -1338,7 +1349,7 @@ static void doInitGlobalConfig(void) {
cfg
.
option
=
"enableCoreFile"
;
cfg
.
ptr
=
&
tsEnableCoreFile
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
32
;
cfg
.
valType
=
TAOS_CFG_VTYPE_INT
8
;
cfg
.
cfgType
=
TSDB_CFG_CTYPE_B_CONFIG
;
cfg
.
minValue
=
0
;
cfg
.
maxValue
=
1
;
...
...
src/dnode/src/dnodeVnodes.c
浏览文件 @
f8adfac4
...
...
@@ -245,12 +245,11 @@ static void dnodeSendStatusMsg(void *handle, void *tmrId) {
pStatus
->
lastReboot
=
htonl
(
tsRebootTime
);
pStatus
->
numOfCores
=
htons
((
uint16_t
)
tsNumOfCores
);
pStatus
->
diskAvailable
=
tsAvailDataDirGB
;
pStatus
->
alternativeRole
=
(
uint8_t
)
tsAlternativeRole
;
pStatus
->
alternativeRole
=
tsAlternativeRole
;
tstrncpy
(
pStatus
->
dnodeEp
,
tsLocalEp
,
TSDB_EP_LEN
);
// fill cluster cfg parameters
pStatus
->
clusterCfg
.
numOfMnodes
=
htonl
(
tsNumOfMnodes
);
pStatus
->
clusterCfg
.
enableBalance
=
htonl
(
tsEnableBalance
);
pStatus
->
clusterCfg
.
mnodeEqualVnodeNum
=
htonl
(
tsMnodeEqualVnodeNum
);
pStatus
->
clusterCfg
.
offlineThreshold
=
htonl
(
tsOfflineThreshold
);
pStatus
->
clusterCfg
.
statusInterval
=
htonl
(
tsStatusInterval
);
...
...
@@ -262,7 +261,12 @@ static void dnodeSendStatusMsg(void *handle, void *tmrId) {
char
timestr
[
32
]
=
"1970-01-01 00:00:00.00"
;
(
void
)
taosParseTime
(
timestr
,
&
pStatus
->
clusterCfg
.
checkTime
,
strlen
(
timestr
),
TSDB_TIME_PRECISION_MILLI
,
0
);
tstrncpy
(
pStatus
->
clusterCfg
.
locale
,
tsLocale
,
TSDB_LOCALE_LEN
);
tstrncpy
(
pStatus
->
clusterCfg
.
charset
,
tsCharset
,
TSDB_LOCALE_LEN
);
tstrncpy
(
pStatus
->
clusterCfg
.
charset
,
tsCharset
,
TSDB_LOCALE_LEN
);
pStatus
->
clusterCfg
.
enableBalance
=
tsEnableBalance
;
pStatus
->
clusterCfg
.
flowCtrl
=
tsEnableFlowCtrl
;
pStatus
->
clusterCfg
.
slaveQuery
=
tsEnableSlaveQuery
;
pStatus
->
clusterCfg
.
adjustMaster
=
tsEnableAdjustMaster
;
vnodeBuildStatusMsg
(
pStatus
);
contLen
=
sizeof
(
SStatusMsg
)
+
pStatus
->
openVnodes
*
sizeof
(
SVnodeLoad
);
...
...
src/inc/taosmsg.h
浏览文件 @
f8adfac4
...
...
@@ -604,7 +604,6 @@ typedef struct {
typedef
struct
{
int32_t
numOfMnodes
;
// tsNumOfMnodes
int32_t
enableBalance
;
// tsEnableBalance
int32_t
mnodeEqualVnodeNum
;
// tsMnodeEqualVnodeNum
int32_t
offlineThreshold
;
// tsOfflineThreshold
int32_t
statusInterval
;
// tsStatusInterval
...
...
@@ -615,6 +614,11 @@ typedef struct {
int64_t
checkTime
;
// 1970-01-01 00:00:00.000
char
locale
[
TSDB_LOCALE_LEN
];
// tsLocale
char
charset
[
TSDB_LOCALE_LEN
];
// tsCharset
int8_t
enableBalance
;
// tsEnableBalance
int8_t
flowCtrl
;
int8_t
slaveQuery
;
int8_t
adjustMaster
;
int8_t
reserved
[
4
];
}
SClusterCfg
;
typedef
struct
{
...
...
src/mnode/inc/mnodeDnode.h
浏览文件 @
f8adfac4
...
...
@@ -52,6 +52,9 @@ typedef enum EDnodeOfflineReason {
TAOS_DN_OFF_TIME_ZONE_NOT_MATCH
,
TAOS_DN_OFF_LOCALE_NOT_MATCH
,
TAOS_DN_OFF_CHARSET_NOT_MATCH
,
TAOS_DN_OFF_FLOW_CTRL_NOT_MATCH
,
TAOS_DN_OFF_SLAVE_QUERY_NOT_MATCH
,
TAOS_DN_OFF_ADJUST_MASTER_NOT_MATCH
,
TAOS_DN_OFF_OTHERS
}
EDnodeOfflineReason
;
...
...
src/mnode/src/mnodeDnode.c
浏览文件 @
f8adfac4
...
...
@@ -375,10 +375,6 @@ static int32_t mnodeCheckClusterCfgPara(const SClusterCfg *clusterCfg) {
mError
(
"
\"
numOfMnodes
\"
[%d - %d] cfg parameters inconsistent"
,
clusterCfg
->
numOfMnodes
,
htonl
(
tsNumOfMnodes
));
return
TAOS_DN_OFF_NUM_OF_MNODES_NOT_MATCH
;
}
if
(
clusterCfg
->
enableBalance
!=
htonl
(
tsEnableBalance
))
{
mError
(
"
\"
balance
\"
[%d - %d] cfg parameters inconsistent"
,
clusterCfg
->
enableBalance
,
htonl
(
tsEnableBalance
));
return
TAOS_DN_OFF_ENABLE_BALANCE_NOT_MATCH
;
}
if
(
clusterCfg
->
mnodeEqualVnodeNum
!=
htonl
(
tsMnodeEqualVnodeNum
))
{
mError
(
"
\"
mnodeEqualVnodeNum
\"
[%d - %d] cfg parameters inconsistent"
,
clusterCfg
->
mnodeEqualVnodeNum
,
htonl
(
tsMnodeEqualVnodeNum
));
...
...
@@ -428,6 +424,23 @@ static int32_t mnodeCheckClusterCfgPara(const SClusterCfg *clusterCfg) {
return
TAOS_DN_OFF_CHARSET_NOT_MATCH
;
}
if
(
clusterCfg
->
enableBalance
!=
tsEnableBalance
)
{
mError
(
"
\"
balance
\"
[%d - %d] cfg parameters inconsistent"
,
clusterCfg
->
enableBalance
,
tsEnableBalance
);
return
TAOS_DN_OFF_ENABLE_BALANCE_NOT_MATCH
;
}
if
(
clusterCfg
->
flowCtrl
!=
tsEnableFlowCtrl
)
{
mError
(
"
\"
flowCtrl
\"
[%d - %d] cfg parameters inconsistent"
,
clusterCfg
->
flowCtrl
,
tsEnableFlowCtrl
);
return
TAOS_DN_OFF_FLOW_CTRL_NOT_MATCH
;
}
if
(
clusterCfg
->
slaveQuery
!=
tsEnableSlaveQuery
)
{
mError
(
"
\"
slaveQuery
\"
[%d - %d] cfg parameters inconsistent"
,
clusterCfg
->
slaveQuery
,
tsEnableSlaveQuery
);
return
TAOS_DN_OFF_SLAVE_QUERY_NOT_MATCH
;
}
if
(
clusterCfg
->
adjustMaster
!=
tsEnableAdjustMaster
)
{
mError
(
"
\"
adjustMaster
\"
[%d - %d] cfg parameters inconsistent"
,
clusterCfg
->
adjustMaster
,
tsEnableAdjustMaster
);
return
TAOS_DN_OFF_ADJUST_MASTER_NOT_MATCH
;
}
return
0
;
}
...
...
src/query/inc/queryLog.h
浏览文件 @
f8adfac4
...
...
@@ -22,8 +22,8 @@ extern "C" {
#include "tlog.h"
extern
u
int32_t
qDebugFlag
;
extern
uint32_t
tscEmbedded
;
extern
int32_t
qDebugFlag
;
extern
int8_t
tscEmbedded
;
#define qFatal(...) do { if (qDebugFlag & DEBUG_FATAL) { taosPrintLog("QRY FATAL ", 255, __VA_ARGS__); }} while(0)
#define qError(...) do { if (qDebugFlag & DEBUG_ERROR) { taosPrintLog("QRY ERROR ", 255, __VA_ARGS__); }} while(0)
...
...
src/rpc/inc/rpcLog.h
浏览文件 @
f8adfac4
...
...
@@ -23,7 +23,7 @@ extern "C" {
#include "tlog.h"
extern
int32_t
rpcDebugFlag
;
extern
uint32_t
tscEmbedded
;
extern
int8_t
tscEmbedded
;
#define tFatal(...) { if (rpcDebugFlag & DEBUG_FATAL) { taosPrintLog("RPC FATAL ", tscEmbedded ? 255 : rpcDebugFlag, __VA_ARGS__); }}
#define tError(...) { if (rpcDebugFlag & DEBUG_ERROR) { taosPrintLog("RPC ERROR ", tscEmbedded ? 255 : rpcDebugFlag, __VA_ARGS__); }}
...
...
src/tsdb/inc/tsdbMain.h
浏览文件 @
f8adfac4
...
...
@@ -31,7 +31,7 @@
extern
"C"
{
#endif
extern
u
int32_t
tsdbDebugFlag
;
extern
int32_t
tsdbDebugFlag
;
#define tsdbFatal(...) do { if (tsdbDebugFlag & DEBUG_FATAL) { taosPrintLog("TDB FATAL ", 255, __VA_ARGS__); }} while(0)
#define tsdbError(...) do { if (tsdbDebugFlag & DEBUG_ERROR) { taosPrintLog("TDB ERROR ", 255, __VA_ARGS__); }} while(0)
...
...
src/util/inc/tconfig.h
浏览文件 @
f8adfac4
...
...
@@ -41,6 +41,7 @@ enum {
};
enum
{
TAOS_CFG_VTYPE_INT8
,
TAOS_CFG_VTYPE_INT16
,
TAOS_CFG_VTYPE_INT32
,
TAOS_CFG_VTYPE_FLOAT
,
...
...
src/util/src/tconfig.c
浏览文件 @
f8adfac4
...
...
@@ -95,6 +95,23 @@ static void taosReadInt16Config(SGlobalCfg *cfg, char *input_value) {
}
}
static
void
taosReadInt8Config
(
SGlobalCfg
*
cfg
,
char
*
input_value
)
{
int32_t
value
=
atoi
(
input_value
);
int8_t
*
option
=
(
int8_t
*
)
cfg
->
ptr
;
if
(
value
<
cfg
->
minValue
||
value
>
cfg
->
maxValue
)
{
uError
(
"config option:%s, input value:%s, out of range[%f, %f], use default value:%d"
,
cfg
->
option
,
input_value
,
cfg
->
minValue
,
cfg
->
maxValue
,
*
option
);
}
else
{
if
(
cfg
->
cfgStatus
<=
TAOS_CFG_CSTATUS_FILE
)
{
*
option
=
(
int8_t
)
value
;
cfg
->
cfgStatus
=
TAOS_CFG_CSTATUS_FILE
;
}
else
{
uWarn
(
"config option:%s, input value:%s, is configured by %s, use %d"
,
cfg
->
option
,
input_value
,
tsCfgStatusStr
[
cfg
->
cfgStatus
],
*
option
);
}
}
}
static
void
taosReadDirectoryConfig
(
SGlobalCfg
*
cfg
,
char
*
input_value
)
{
int
length
=
(
int
)
strlen
(
input_value
);
char
*
option
=
(
char
*
)
cfg
->
ptr
;
...
...
@@ -204,6 +221,9 @@ static void taosReadConfigOption(const char *option, char *value) {
if
(
strcasecmp
(
cfg
->
option
,
option
)
!=
0
)
continue
;
switch
(
cfg
->
valType
)
{
case
TAOS_CFG_VTYPE_INT8
:
taosReadInt8Config
(
cfg
,
value
);
break
;
case
TAOS_CFG_VTYPE_INT16
:
taosReadInt16Config
(
cfg
,
value
);
break
;
...
...
src/util/src/tlog.c
浏览文件 @
f8adfac4
...
...
@@ -64,7 +64,7 @@ typedef struct {
}
SLogObj
;
int32_t
tsLogKeepDays
=
0
;
int
32_t
tsAsyncLog
=
1
;
int
8_t
tsAsyncLog
=
1
;
float
tsTotalLogDirGB
=
0
;
float
tsAvailLogDirGB
=
0
;
float
tsMinimalLogDirGB
=
1
.
0
f
;
...
...
src/util/src/ttimer.c
浏览文件 @
f8adfac4
...
...
@@ -19,7 +19,7 @@
#include "ttimer.h"
#include "tutil.h"
extern
uint32
_t
tscEmbedded
;
extern
int8
_t
tscEmbedded
;
#define tmrFatal(...) { if (tmrDebugFlag & DEBUG_FATAL) { taosPrintLog("TMR FATAL ", tscEmbedded ? 255 : tmrDebugFlag, __VA_ARGS__); }}
#define tmrError(...) { if (tmrDebugFlag & DEBUG_ERROR) { taosPrintLog("TMR ERROR ", tscEmbedded ? 255 : tmrDebugFlag, __VA_ARGS__); }}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录