未验证 提交 2b673c3d 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #2360 from taosdata/hotfix/test

Hotfix/test
...@@ -6,10 +6,22 @@ ...@@ -6,10 +6,22 @@
######################################################## ########################################################
# first full-qualified domain name (FQDN) for TDengine system # first full-qualified domain name (FQDN) for TDengine system
# first 127.0.0.1 # first hostname1:6030
# second full-qualified domain name (FQDN) for TDengine system, for cluster edition only # second full-qualified domain name (FQDN) for TDengine system, for cluster edition only
# second 127.0.0.1 # second cluster_hostname2:6030
# the arbitrator's full-qualified domain name (FQDN) for TDengine system, for cluster edition only
# arbitrator arbitrator_hostname:6030
# the full-qualified domain name (FQDN) of dnode
# fqdn hostname:6030
# port for MNode connect to Client, default udp[6030-6055] tcp[6030]
# serverPort 6030
# http service port, default tcp[6020]
# httpPort 6020
# set socket type ("udp" and "tcp") # set socket type ("udp" and "tcp")
# the server and client should have the same socket type. Otherwise, connect will fail # the server and client should have the same socket type. Otherwise, connect will fail
...@@ -30,42 +42,38 @@ ...@@ -30,42 +42,38 @@
# log file's directory # log file's directory
# logDir /var/log/taos # logDir /var/log/taos
# http service port, default tcp[6020] # number of management nodes in the system
# httpPort 6020 # numOfMnodes 3
# port for MNode connect to Client, default udp[6030-6055] tcp[6030] # optional roles for dnode. 0 - any, 1 - mnode, 2 - dnode
# serverPort 6030 # alternativeRole 0
# number of threads per CPU core # number of threads per CPU core
# numOfThreadsPerCore 1 # numOfThreadsPerCore 1.0
# number of vnodes per core in DNode # number of vnodes per core in DNode
# numOfVnodesPerCore 8 # numOfVnodesPerCore 8
# the ratio of threads responsible for querying in the total thread
# ratioOfQueryThreads 0.5
# number of total vnodes in DNode # number of total vnodes in DNode
# numOfTotalVnodes 0 # numOfTotalVnodes 0
# max number of tables per vnode # max number of tables per vnode
# maxtablesPerVnode 1000 # maxtablesPerVnode 1000
# cache block size # interval of check load balance when the management node is in normal operation
# cache 16384 # balanceInterval 300
# row of records in file block # interval of DNode report status to MNode, unit is Second, for cluster version only
# minRows 100 # statusInterval 1
# maxRows 4096
# number of cache blocks per vnode # interval of Shell send HB to MNode, unit is Second
# blocks 2 # shellActivityTimer 3
# interval of system monitor # interval of system monitor
# monitorInterval 60 # monitorInterval 30
# the compressed rpc message, option:
# -1 (no compression)
# 0 (all message compressed),
# > 0 (rpc message body which larger than this value will be compressed)
# compressMsgSize -1
# RPC re-try timer, millisecond # RPC re-try timer, millisecond
# rpcTimer 300 # rpcTimer 300
...@@ -73,38 +81,20 @@ ...@@ -73,38 +81,20 @@
# RPC maximum time for ack, seconds # RPC maximum time for ack, seconds
# rpcMaxTime 600 # rpcMaxTime 600
# commit interval,unit is second
# ctime 3600
# interval of DNode report status to MNode, unit is Second, for cluster version only
# statusInterval 1
# interval of Shell send HB to MNode, unit is Second
# shellActivityTimer 3
# interval of DNode send HB to DNode, unit is Second, for cluster version only
# vnodePeerHBTimer 1
# interval of MNode send HB to MNode, unit is Second, for cluster version only
# mgmtPeerHBTimer 1
# duration of to keep tableMeta kept in Cache, seconds # duration of to keep tableMeta kept in Cache, seconds
# tableMetaKeepTimer 7200 # tableMetaKeepTimer 7200
# max number of users # Minimum sliding window time
# maxUsers 1000 # minSlidingTime 10
# max number of databases
# maxDbs 1000
# max number of tables # Time window minimum
# maxTables 650000 # minIntervalTime 10
# max number of Dnodes, for cluster version only # max length of an SQL
# maxDnodes 1000 # maxSQLLength 65380
# Max number of VGroups, for cluster version only # Support the maximum number of records allowed for super table time sorting
# maxVGroups 1000 # maxNumOfOrderedRes 100000
# system locale # system locale
# locale en_US.UTF-8 # locale en_US.UTF-8
...@@ -121,6 +111,24 @@ ...@@ -121,6 +111,24 @@
# enable/disable async log # enable/disable async log
# asyncLog 1 # asyncLog 1
# the compressed rpc message, option:
# -1 (no compression)
# 0 (all message compressed),
# > 0 (rpc message body which larger than this value will be compressed)
# compressMsgSize -1
# cache block size (Mbyte)
# cache 16
# number of cache blocks per vnode
# blocks 4
# min row of records in file block
# minRows 100
# max row of records in file block
# maxRows 4096
# enable/disable compression # enable/disable compression
# comp 1 # comp 1
...@@ -131,31 +139,25 @@ ...@@ -131,31 +139,25 @@
# keep 3650 # keep 3650
# number of replications, for cluster version only # number of replications, for cluster version only
# replications 1 # replica 1
# client default database(database should be created) # max number of connections from client for dnode
# defaultDB # maxShellConns 5000
# client default username # max numerber of connections to one database
# defaultUser root # maxConnections 5000
# client default password # Stop writing logs when the disk size of the log folder is less than this value
# defaultPass taosdata # minimalLogDirGB 0.1
# max number of connections from client for mgmt node # Stop writing temporary files when the disk size of the log folder is less than this value
# maxShellConns 2000 # minimalTmpDirGB 0.1
# max numerber of meter Connections # Stop writing data when the disk size of the log folder is less than this value
# maxMeterConnections 10000 # minimalDataDirGB 0.1
# max connection to management node
# maxMgmtConnections 2000
# max connection to Vnode
# maxVnodeConnections 10000
# mnode take into account while balance, for cluster version only # mnode take into account while balance, for cluster version only
# mnodeEqualVnodeNum 4 # mnodeEqualVnodeNum 4
# number of seconds allowed for a dnode to be offline, for cluster version only # number of seconds allowed for a dnode to be offline, for cluster version only
# offlineThreshold 864000 # offlineThreshold 864000
...@@ -170,10 +172,10 @@ ...@@ -170,10 +172,10 @@
# mqtt 0 # mqtt 0
# mqtt uri # mqtt uri
# mqttBrokerAddress mqtt://username:password@hostname:1883/taos/ # mqttBrokerAddress mqtt://username:password@hostname:1883/taos/
# mqtt client name # mqtt client name
# mqttBrokerClientId taos_mqtt # mqttBrokerClientId taos_mqtt
# maximum number of rows returned by the restful interface # maximum number of rows returned by the restful interface
# restfulRowLimit 10240 # restfulRowLimit 10240
...@@ -181,41 +183,17 @@ ...@@ -181,41 +183,17 @@
# number of threads used to process http requests # number of threads used to process http requests
# httpMaxThreads 2 # httpMaxThreads 2
# pre-allocated number of http sessions # The minimum time to wait before the first stream execution
# httpCacheSessions 100 # maxFirstStreamCompDelay 10000
# whether to enable HTTP compression transmission # Retry wait time benchmark
# httpEnableCompress 0 # retryStreamCompDelay 10
# the delayed time for launching each continuous query. 10% of the whole computing time window by default. # the delayed time for launching each continuous query. 10% of the whole computing time window by default.
# streamCompDelayRatio 0.1 # streamCompDelayRatio 0.1
# the max allowed delayed time for launching continuous query. 20ms by default # the max allowed delayed time for launching continuous query. 20ms by default
# tsMaxStreamComputDelay 20000 # maxStreamCompDelay 20000
# whether the telegraf table name contains the number of tags and the number of fields
# telegrafUseFieldNum 0
# enable table names generated by telegraf can be configured
# use /etc/taos/taos.telegraf.cfg as the configuration file, such as
# {
# "metrics": [
# {
# "name" : "system",
# "tbname" : "system_uptime",
# "fields": [
# "uptime"
# ]
# },
# {
# "name": "system",
# "tbname" : "system_uptime_format",
# "fields": [
# "uptime_format"
# ]
# }
# ]
# }
# The following parameter is used to limit the maximum number of lines in log files. # The following parameter is used to limit the maximum number of lines in log files.
# max number of rows per log filters # max number of rows per log filters
...@@ -226,35 +204,62 @@ ...@@ -226,35 +204,62 @@
# 131: output warning and error,135: output info, warning and error to log. # 131: output warning and error,135: output info, warning and error to log.
# 199: output debug, info, warning and error to both screen and file # 199: output debug, info, warning and error to both screen and file
# debug flag for basic utils
# debugFlag 131
# debug flag for meta management messages # debug flag for meta management messages
# mDebugFlag 135 # mDebugFlag 135
# debug flag for dnode messages # debug flag for dnode messages
# dDebugFlag 131 # dDebugFlag 131
# debug flag for TDengine SDB
# sDebugFlag 135
# debug flag for TDengine SDB # debug flag for TDengine SDB
# sdbDebugFlag 135 # sdbDebugFlag 135
# debug flag for RPC # debug flag for RPC
# rpcDebugFlag 131 # rpcDebugFlag 131
# debug flag for basic utils # debug flag for TAOS TIMER
# debugFlag 131 # tmrDebugFlag 131
# debug flag for TDengine client # debug flag for TDengine client
# cDebugFlag 131 # cDebugFlag 131
# debug flag for query # debug flag for JNI
# qDebugflag 131 # jniDebugflag 131
# debug flag for ODBC
# odbcDebugflag 131
# debug flag for storage
# uDebugflag 131
# debug flag for http server # debug flag for http server
# httpDebugFlag 131 # httpDebugFlag 131
# debug flag for system monitor # debug flag for mqtt
# mqttDebugFlag 131
# debug flag for monitor
# monitorDebugFlag 131 # monitorDebugFlag 131
#debug flag for mqtt client # debug flag for query
# mqttDebugFlag 131 # qDebugflag 131
# debug flag for TAOS TIMER # debug flag for http server
# tmrDebugFlag 131 # tsdbDebugFlag 131
# Record the SQL through restful interface
# httpEnableRecordSql 0
# Record the SQL in taos client
# tscEnableRecordSql 0
# if generate core file when service crash
# enableCoreFile 1
# The maximum display width of binary and nchar fields in the shell. The parts exceeding this limit will be hidden
# maxBinaryDisplayWidth 30
\ No newline at end of file
...@@ -29,21 +29,28 @@ struct SAcctObj; ...@@ -29,21 +29,28 @@ struct SAcctObj;
struct SUserObj; struct SUserObj;
struct SMnodeObj; struct SMnodeObj;
/*
struct define notes:
1. The first field must be the xxxxId field or name field , e.g. 'int32_t dnodeId', 'int32_t mnodeId', 'char name[]', 'char user[]', ...
2. From the dnodeId field to the updataEnd field, these information will be falled disc;
3. The fields behind the updataEnd field can be changed;
*/
typedef struct SDnodeObj { typedef struct SDnodeObj {
int32_t dnodeId; int32_t dnodeId;
uint16_t dnodePort;
char dnodeFqdn[TSDB_FQDN_LEN];
char dnodeEp[TSDB_EP_LEN];
int64_t createdTime;
uint32_t lastAccess;
int32_t openVnodes; int32_t openVnodes;
int64_t createdTime;
int32_t totalVnodes; // from dnode status msg, config information int32_t totalVnodes; // from dnode status msg, config information
int32_t customScore; // config by user int32_t customScore; // config by user
uint32_t lastAccess;
uint16_t numOfCores; // from dnode status msg uint16_t numOfCores; // from dnode status msg
uint16_t dnodePort;
char dnodeFqdn[TSDB_FQDN_LEN];
char dnodeEp[TSDB_EP_LEN];
int8_t alternativeRole; // from dnode status msg, 0-any, 1-mgmt, 2-dnode int8_t alternativeRole; // from dnode status msg, 0-any, 1-mgmt, 2-dnode
int8_t status; // set in balance function int8_t status; // set in balance function
int8_t isMgmt; int8_t isMgmt;
int8_t reserved[15]; int8_t reserved0[14];
int8_t updateEnd[1]; int8_t updateEnd[1];
int32_t refCount; int32_t refCount;
uint32_t moduleStatus; uint32_t moduleStatus;
...@@ -54,15 +61,18 @@ typedef struct SDnodeObj { ...@@ -54,15 +61,18 @@ typedef struct SDnodeObj {
int16_t cpuAvgUsage; // calc from sys.cpu int16_t cpuAvgUsage; // calc from sys.cpu
int16_t memoryAvgUsage; // calc from sys.mem int16_t memoryAvgUsage; // calc from sys.mem
int16_t bandwidthUsage; // calc from sys.band int16_t bandwidthUsage; // calc from sys.band
int8_t reserved1[2];
} SDnodeObj; } SDnodeObj;
typedef struct SMnodeObj { typedef struct SMnodeObj {
int32_t mnodeId; int32_t mnodeId;
int8_t reserved0[4];
int64_t createdTime; int64_t createdTime;
int8_t reserved[14]; int8_t reserved1[7];
int8_t updateEnd[1]; int8_t updateEnd[1];
int32_t refCount; int32_t refCount;
int8_t role; int8_t role;
int8_t reserved2[3];
} SMnodeObj; } SMnodeObj;
typedef struct STableObj { typedef struct STableObj {
...@@ -71,34 +81,37 @@ typedef struct STableObj { ...@@ -71,34 +81,37 @@ typedef struct STableObj {
} STableObj; } STableObj;
typedef struct SSuperTableObj { typedef struct SSuperTableObj {
STableObj info; STableObj info;
int8_t reserved0[3]; // for fill struct STableObj to 4byte align
int32_t sversion;
uint64_t uid; uint64_t uid;
int64_t createdTime; int64_t createdTime;
int32_t sversion;
int32_t tversion; int32_t tversion;
int32_t numOfColumns; int32_t numOfColumns;
int32_t numOfTags; int32_t numOfTags;
int8_t reserved[15]; int8_t reserved1[3];
int8_t updateEnd[1]; int8_t updateEnd[1];
int32_t refCount; int32_t refCount;
int32_t numOfTables; int32_t numOfTables;
int16_t nextColId;
SSchema * schema; SSchema * schema;
void * vgHash; void * vgHash;
int16_t nextColId;
int8_t reserved2[6];
} SSuperTableObj; } SSuperTableObj;
typedef struct { typedef struct {
STableObj info; STableObj info;
int8_t reserved0[3]; // for fill struct STableObj to 4byte align
int32_t sversion; //used by normal table
uint64_t uid; uint64_t uid;
uint64_t suid;
int64_t createdTime; int64_t createdTime;
int32_t sversion; //used by normal table
int32_t numOfColumns; //used by normal table int32_t numOfColumns; //used by normal table
int32_t sid; int32_t sid;
int32_t vgId; int32_t vgId;
uint64_t suid;
int32_t sqlLen; int32_t sqlLen;
int8_t reserved[1];
int8_t updateEnd[1]; int8_t updateEnd[1];
int8_t reserved1[1];
int16_t nextColId; //used by normal table int16_t nextColId; //used by normal table
int32_t refCount; int32_t refCount;
char* sql; //used by normal table char* sql; //used by normal table
...@@ -115,23 +128,24 @@ typedef struct { ...@@ -115,23 +128,24 @@ typedef struct {
typedef struct SVgObj { typedef struct SVgObj {
uint32_t vgId; uint32_t vgId;
char dbName[TSDB_DB_NAME_LEN];
int64_t createdTime;
SVnodeGid vnodeGid[TSDB_MAX_REPLICA];
int32_t numOfVnodes; int32_t numOfVnodes;
int64_t createdTime;
int32_t lbDnodeId; int32_t lbDnodeId;
int32_t lbTime; int32_t lbTime;
char dbName[TSDB_DB_NAME_LEN];
int8_t inUse; int8_t inUse;
int8_t accessState; int8_t accessState;
int8_t reserved[12]; int8_t reserved0[5];
SVnodeGid vnodeGid[TSDB_MAX_REPLICA];
int8_t reserved1[7];
int8_t updateEnd[1]; int8_t updateEnd[1];
int32_t refCount; int32_t refCount;
struct SVgObj *prev, *next;
struct SDbObj *pDb;
int32_t numOfTables; int32_t numOfTables;
int64_t totalStorage; int64_t totalStorage;
int64_t compStorage; int64_t compStorage;
int64_t pointsWritten; int64_t pointsWritten;
struct SVgObj *prev, *next;
struct SDbObj *pDb;
void * idPool; void * idPool;
SChildTableObj **tableList; SChildTableObj **tableList;
} SVgObj; } SVgObj;
...@@ -151,17 +165,18 @@ typedef struct { ...@@ -151,17 +165,18 @@ typedef struct {
int8_t compression; int8_t compression;
int8_t walLevel; int8_t walLevel;
int8_t replications; int8_t replications;
int8_t reserved[16]; int8_t reserved[12];
} SDbCfg; } SDbCfg;
typedef struct SDbObj { typedef struct SDbObj {
char name[TSDB_ACCT_LEN + TSDB_DB_NAME_LEN]; char name[TSDB_ACCT_LEN + TSDB_DB_NAME_LEN];
int8_t reserved0[4];
char acct[TSDB_USER_LEN]; char acct[TSDB_USER_LEN];
int64_t createdTime; int64_t createdTime;
int32_t cfgVersion; int32_t cfgVersion;
SDbCfg cfg; SDbCfg cfg;
int8_t status; int8_t status;
int8_t reserved[14]; int8_t reserved1[14];
int8_t updateEnd[1]; int8_t updateEnd[1];
int32_t refCount; int32_t refCount;
int32_t numOfVgroups; int32_t numOfVgroups;
...@@ -186,13 +201,6 @@ typedef struct SUserObj { ...@@ -186,13 +201,6 @@ typedef struct SUserObj {
} SUserObj; } SUserObj;
typedef struct { typedef struct {
int32_t numOfUsers;
int32_t numOfDbs;
int32_t numOfTimeSeries;
int32_t numOfPointsPerSecond;
int32_t numOfConns;
int32_t numOfQueries;
int32_t numOfStreams;
int64_t totalStorage; // Total storage wrtten from this account int64_t totalStorage; // Total storage wrtten from this account
int64_t compStorage; // Compressed storage on disk int64_t compStorage; // Compressed storage on disk
int64_t queryTime; int64_t queryTime;
...@@ -200,34 +208,44 @@ typedef struct { ...@@ -200,34 +208,44 @@ typedef struct {
int64_t inblound; int64_t inblound;
int64_t outbound; int64_t outbound;
int64_t sKey; int64_t sKey;
int32_t numOfUsers;
int32_t numOfDbs;
int32_t numOfTimeSeries;
int32_t numOfPointsPerSecond;
int32_t numOfConns;
int32_t numOfQueries;
int32_t numOfStreams;
int8_t accessState; // Checked by mgmt heartbeat message int8_t accessState; // Checked by mgmt heartbeat message
int8_t reserved[3];
} SAcctInfo; } SAcctInfo;
typedef struct SAcctObj { typedef struct SAcctObj {
char user[TSDB_USER_LEN]; char user[TSDB_USER_LEN];
char pass[TSDB_KEY_LEN]; char pass[TSDB_KEY_LEN];
SAcctCfg cfg; SAcctCfg cfg;
int32_t acctId;
int64_t createdTime; int64_t createdTime;
int32_t acctId;
int8_t status; int8_t status;
int8_t reserved[14]; int8_t reserved0[10];
int8_t updateEnd[1]; int8_t updateEnd[1];
int32_t refCount;
SAcctInfo acctInfo; SAcctInfo acctInfo;
int32_t refCount;
int8_t reserved1[4];
pthread_mutex_t mutex; pthread_mutex_t mutex;
} SAcctObj; } SAcctObj;
typedef struct { typedef struct {
int8_t type;
int32_t index;
char db[TSDB_DB_NAME_LEN]; char db[TSDB_DB_NAME_LEN];
void * pIter; int8_t type;
int16_t numOfColumns; int16_t numOfColumns;
int32_t index;
int32_t rowSize; int32_t rowSize;
int32_t numOfRows; int32_t numOfRows;
int32_t numOfReads; void * pIter;
int16_t offset[TSDB_MAX_COLUMNS]; int16_t offset[TSDB_MAX_COLUMNS];
int16_t bytes[TSDB_MAX_COLUMNS]; int16_t bytes[TSDB_MAX_COLUMNS];
int32_t numOfReads;
int8_t reserved0[2];
uint16_t payloadLen; uint16_t payloadLen;
char payload[]; char payload[];
} SShowObj; } SShowObj;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册