Merge branch '3.0' into feature/tq
This commit is contained in:
commit
652c05c6e8
|
@ -221,8 +221,7 @@ typedef struct SBuildTableMetaInput {
|
||||||
|
|
||||||
typedef struct SBuildUseDBInput {
|
typedef struct SBuildUseDBInput {
|
||||||
char db[TSDB_TABLE_FNAME_LEN];
|
char db[TSDB_TABLE_FNAME_LEN];
|
||||||
int32_t vgroupVersion;
|
int32_t vgVersion;
|
||||||
int32_t dbGroupVersion;
|
|
||||||
} SBuildUseDBInput;
|
} SBuildUseDBInput;
|
||||||
|
|
||||||
|
|
||||||
|
@ -627,8 +626,7 @@ typedef struct {
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char db[TSDB_TABLE_FNAME_LEN];
|
char db[TSDB_TABLE_FNAME_LEN];
|
||||||
int8_t ignoreNotExists;
|
int8_t ignoreNotExists;
|
||||||
int32_t vgroupVersion;
|
int32_t vgVersion;
|
||||||
int32_t dbGroupVersion;
|
|
||||||
int32_t reserve[8];
|
int32_t reserve[8];
|
||||||
} SUseDbMsg;
|
} SUseDbMsg;
|
||||||
|
|
||||||
|
@ -808,6 +806,9 @@ typedef struct SSTableVgroupMsg {
|
||||||
|
|
||||||
typedef struct SVgroupInfo {
|
typedef struct SVgroupInfo {
|
||||||
int32_t vgId;
|
int32_t vgId;
|
||||||
|
int32_t hashBegin;
|
||||||
|
int32_t hashEnd;
|
||||||
|
int8_t inUse;
|
||||||
int8_t numOfEps;
|
int8_t numOfEps;
|
||||||
SEpAddrMsg epAddr[TSDB_MAX_REPLICA];
|
SEpAddrMsg epAddr[TSDB_MAX_REPLICA];
|
||||||
} SVgroupInfo;
|
} SVgroupInfo;
|
||||||
|
@ -841,7 +842,7 @@ typedef struct {
|
||||||
int32_t tversion;
|
int32_t tversion;
|
||||||
uint64_t tuid;
|
uint64_t tuid;
|
||||||
uint64_t suid;
|
uint64_t suid;
|
||||||
SVgroupMsg vgroup;
|
int32_t vgId;
|
||||||
SSchema pSchema[];
|
SSchema pSchema[];
|
||||||
} STableMetaMsg;
|
} STableMetaMsg;
|
||||||
|
|
||||||
|
@ -863,15 +864,12 @@ typedef struct {
|
||||||
} STagData;
|
} STagData;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int32_t vgroupNum;
|
char db[TSDB_FULL_DB_NAME_LEN];
|
||||||
int32_t vgroupVersion;
|
int32_t vgVersion;
|
||||||
char db[TSDB_TABLE_FNAME_LEN];
|
int32_t vgNum;
|
||||||
int32_t dbVgroupVersion;
|
int8_t hashMethod;
|
||||||
int32_t dbVgroupNum;
|
|
||||||
int32_t dbHashRange;
|
|
||||||
SVgroupInfo vgroupInfo[];
|
SVgroupInfo vgroupInfo[];
|
||||||
//int32_t vgIdList[];
|
} SUseDbRsp;
|
||||||
} SUseDbRspMsg;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -29,12 +29,7 @@ extern char tsLocalFqdn[];
|
||||||
extern char tsLocalEp[];
|
extern char tsLocalEp[];
|
||||||
extern uint16_t tsServerPort;
|
extern uint16_t tsServerPort;
|
||||||
extern int32_t tsStatusInterval;
|
extern int32_t tsStatusInterval;
|
||||||
extern int32_t tsNumOfMnodes;
|
|
||||||
extern int8_t tsEnableVnodeBak;
|
|
||||||
extern int8_t tsEnableTelemetryReporting;
|
extern int8_t tsEnableTelemetryReporting;
|
||||||
extern char tsArbitrator[];
|
|
||||||
extern int8_t tsArbOnline;
|
|
||||||
extern int64_t tsArbOnlineTimestamp;
|
|
||||||
|
|
||||||
// common
|
// common
|
||||||
extern int tsRpcTimer;
|
extern int tsRpcTimer;
|
||||||
|
@ -60,7 +55,6 @@ extern int tsCompatibleModel; // 2.0 compatible model
|
||||||
extern int32_t tsQueryBufferSize; // maximum allowed usage buffer size in MB for each data node during query processing
|
extern int32_t tsQueryBufferSize; // maximum allowed usage buffer size in MB for each data node during query processing
|
||||||
extern int64_t tsQueryBufferSizeBytes; // maximum allowed usage buffer size in byte for each data node during query processing
|
extern int64_t tsQueryBufferSizeBytes; // maximum allowed usage buffer size in byte for each data node during query processing
|
||||||
extern int32_t tsRetrieveBlockingModel;// retrieve threads will be blocked
|
extern int32_t tsRetrieveBlockingModel;// retrieve threads will be blocked
|
||||||
|
|
||||||
extern int8_t tsKeepOriginalColumnName;
|
extern int8_t tsKeepOriginalColumnName;
|
||||||
|
|
||||||
// client
|
// client
|
||||||
|
@ -78,66 +72,15 @@ extern float tsStreamComputDelayRatio; // the delayed computing ration of the
|
||||||
extern int32_t tsProjectExecInterval;
|
extern int32_t tsProjectExecInterval;
|
||||||
extern int64_t tsMaxRetentWindow;
|
extern int64_t tsMaxRetentWindow;
|
||||||
|
|
||||||
// db parameters in client
|
|
||||||
extern int32_t tsCacheBlockSize;
|
|
||||||
extern int32_t tsBlocksPerVnode;
|
|
||||||
extern int32_t tsTableIncStepPerVnode;
|
|
||||||
extern int32_t tsMaxVgroupsPerDb;
|
|
||||||
extern int16_t tsDaysPerFile;
|
|
||||||
extern int32_t tsDaysToKeep;
|
|
||||||
extern int32_t tsMinRowsInFileBlock;
|
|
||||||
extern int32_t tsMaxRowsInFileBlock;
|
|
||||||
extern int16_t tsCommitTime; // seconds
|
|
||||||
extern int32_t tsTimePrecision;
|
|
||||||
extern int8_t tsCompression;
|
|
||||||
extern int8_t tsWAL;
|
|
||||||
extern int32_t tsFsyncPeriod;
|
|
||||||
extern int32_t tsReplications;
|
|
||||||
extern int16_t tsPartitons;
|
|
||||||
extern int32_t tsQuorum;
|
|
||||||
extern int8_t tsUpdate;
|
|
||||||
extern int8_t tsCacheLastRow;
|
|
||||||
|
|
||||||
//tsdb
|
|
||||||
extern bool tsdbForceKeepFile;
|
|
||||||
|
|
||||||
// balance
|
// balance
|
||||||
extern int8_t tsEnableBalance;
|
|
||||||
extern int8_t tsAlternativeRole;
|
|
||||||
extern int32_t tsBalanceInterval;
|
|
||||||
extern int32_t tsOfflineThreshold;
|
|
||||||
extern int8_t tsEnableFlowCtrl;
|
|
||||||
extern int8_t tsEnableSlaveQuery;
|
extern int8_t tsEnableSlaveQuery;
|
||||||
extern int8_t tsEnableAdjustMaster;
|
|
||||||
|
|
||||||
// restful
|
|
||||||
extern int32_t tsRestRowLimit;
|
|
||||||
extern int8_t tsTelegrafUseFieldNum;
|
|
||||||
|
|
||||||
// mqtt
|
// interna
|
||||||
extern int8_t tsEnableMqttModule;
|
|
||||||
extern char tsMqttHostName[];
|
|
||||||
extern char tsMqttPort[];
|
|
||||||
extern char tsMqttUser[];
|
|
||||||
extern char tsMqttPass[];
|
|
||||||
extern char tsMqttClientId[];
|
|
||||||
extern char tsMqttTopic[];
|
|
||||||
|
|
||||||
// monitor
|
|
||||||
extern int8_t tsEnableMonitorModule;
|
|
||||||
extern char tsMonitorDbName[];
|
|
||||||
extern char tsInternalPass[];
|
|
||||||
extern int32_t tsMonitorInterval;
|
|
||||||
|
|
||||||
// stream
|
|
||||||
extern int8_t tsEnableStream;
|
|
||||||
|
|
||||||
// internal
|
|
||||||
extern int8_t tsPrintAuth;
|
extern int8_t tsPrintAuth;
|
||||||
extern char tsVnodeDir[];
|
extern char tsVnodeDir[];
|
||||||
extern char tsMnodeDir[];
|
extern char tsMnodeDir[];
|
||||||
extern int64_t tsTickPerDay[3];
|
extern int64_t tsTickPerDay[3];
|
||||||
extern int32_t tsTopicBianryLen;
|
|
||||||
|
|
||||||
// system info
|
// system info
|
||||||
extern float tsTotalLogDirGB;
|
extern float tsTotalLogDirGB;
|
||||||
|
|
|
@ -32,7 +32,7 @@ extern "C" {
|
||||||
struct SCatalog;
|
struct SCatalog;
|
||||||
|
|
||||||
typedef struct SCatalogReq {
|
typedef struct SCatalogReq {
|
||||||
char clusterId[TSDB_CLUSTER_ID_LEN]; //????
|
char dbName[TSDB_DB_NAME_LEN];
|
||||||
SArray *pTableName; // table full name
|
SArray *pTableName; // table full name
|
||||||
SArray *pUdf; // udf name
|
SArray *pUdf; // udf name
|
||||||
bool qNodeRequired; // valid qnode
|
bool qNodeRequired; // valid qnode
|
||||||
|
@ -45,42 +45,10 @@ typedef struct SMetaData {
|
||||||
SEpSet *pEpSet; // qnode epset list
|
SEpSet *pEpSet; // qnode epset list
|
||||||
} SMetaData;
|
} SMetaData;
|
||||||
|
|
||||||
typedef struct STableComInfo {
|
|
||||||
uint8_t numOfTags; // the number of tags in schema
|
|
||||||
uint8_t precision; // the number of precision
|
|
||||||
int16_t numOfColumns; // the number of columns
|
|
||||||
int32_t rowSize; // row size of the schema
|
|
||||||
} STableComInfo;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ASSERT(sizeof(SCTableMeta) == 24)
|
|
||||||
* ASSERT(tableType == TSDB_CHILD_TABLE)
|
|
||||||
* The cached child table meta info. For each child table, 24 bytes are required to keep the essential table info.
|
|
||||||
*/
|
|
||||||
typedef struct SCTableMeta {
|
|
||||||
int32_t vgId:24;
|
|
||||||
int8_t tableType;
|
|
||||||
uint64_t uid;
|
|
||||||
uint64_t suid;
|
|
||||||
} SCTableMeta;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Note that the first 24 bytes of STableMeta are identical to SCTableMeta, it is safe to cast a STableMeta to be a SCTableMeta.
|
|
||||||
*/
|
|
||||||
typedef struct STableMeta {
|
|
||||||
int32_t vgId:24;
|
|
||||||
int8_t tableType;
|
|
||||||
uint64_t uid;
|
|
||||||
uint64_t suid;
|
|
||||||
// if the table is TSDB_CHILD_TABLE, the following information is acquired from the corresponding super table meta info
|
|
||||||
int16_t sversion;
|
|
||||||
int16_t tversion;
|
|
||||||
STableComInfo tableInfo;
|
|
||||||
SSchema schema[];
|
|
||||||
} STableMeta;
|
|
||||||
|
|
||||||
typedef struct SCatalogCfg {
|
typedef struct SCatalogCfg {
|
||||||
|
bool enableVgroupCache;
|
||||||
|
uint32_t maxTblCacheNum;
|
||||||
|
uint32_t maxDBCacheNum;
|
||||||
} SCatalogCfg;
|
} SCatalogCfg;
|
||||||
|
|
||||||
int32_t catalogInit(SCatalogCfg *cfg);
|
int32_t catalogInit(SCatalogCfg *cfg);
|
||||||
|
@ -93,22 +61,14 @@ int32_t catalogInit(SCatalogCfg *cfg);
|
||||||
*/
|
*/
|
||||||
int32_t catalogGetHandle(const char *clusterId, struct SCatalog** catalogHandle);
|
int32_t catalogGetHandle(const char *clusterId, struct SCatalog** catalogHandle);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int32_t catalogGetVgroupVersion(struct SCatalog* pCatalog, int32_t* version);
|
|
||||||
int32_t catalogGetVgroup(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, SArray** pVgroupList);
|
|
||||||
int32_t catalogUpdateVgroup(struct SCatalog* pCatalog, SVgroupListInfo* pVgroup);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int32_t catalogGetDBVgroupVersion(struct SCatalog* pCatalog, const char* dbName, int32_t* version);
|
int32_t catalogGetDBVgroupVersion(struct SCatalog* pCatalog, const char* dbName, int32_t* version);
|
||||||
int32_t catalogGetDBVgroup(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* dbName, int32_t forceUpdate, SDBVgroupInfo** dbInfo);
|
int32_t catalogGetDBVgroup(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* dbName, int32_t forceUpdate, SDBVgroupInfo* dbInfo);
|
||||||
int32_t catalogUpdateDBVgroup(struct SCatalog* pCatalog, const char* dbName, SDBVgroupInfo* dbInfo);
|
int32_t catalogUpdateDBVgroupCache(struct SCatalog* pCatalog, const char* dbName, SDBVgroupInfo* dbInfo);
|
||||||
|
|
||||||
|
|
||||||
int32_t catalogGetTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* pTableName, STableMeta* pTableMeta);
|
int32_t catalogGetTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* pDBName, const char* pTableName, STableMeta** pTableMeta);
|
||||||
int32_t catalogRenewTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const STableMeta* pTableMeta);
|
int32_t catalogRenewTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* pDBName, const char* pTableName);
|
||||||
int32_t catalogRenewAndGetTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const STableMeta* pTableMeta, STableMeta* pNewTableMeta);
|
int32_t catalogRenewAndGetTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* pDBName, const char* pTableName, STableMeta** pTableMeta);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -117,7 +77,7 @@ int32_t catalogRenewAndGetTableMeta(struct SCatalog* pCatalog, void *pRpc, const
|
||||||
* @pVgroupList - array of SVgroupInfo
|
* @pVgroupList - array of SVgroupInfo
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int32_t catalogGetTableVgroup(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* pTableName, SArray* pVgroupList);
|
int32_t catalogGetTableVgroup(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* pDBName, const char* pTableName, SArray* pVgroupList);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -129,7 +89,7 @@ int32_t catalogGetTableVgroup(struct SCatalog* pCatalog, void *pRpc, const SEpSe
|
||||||
* @param pMetaData
|
* @param pMetaData
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int32_t catalogGetAllMeta(struct SCatalog* pCatalog, const SEpSet* pMgmtEps, const SCatalogReq* pReq, SMetaData* pRsp);
|
int32_t catalogGetAllMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const SCatalogReq* pReq, SMetaData* pRsp);
|
||||||
|
|
||||||
|
|
||||||
int32_t catalogGetQnodeList(struct SCatalog* pCatalog, const SEpSet* pMgmtEps, SEpSet* pQnodeEpSet);
|
int32_t catalogGetQnodeList(struct SCatalog* pCatalog, const SEpSet* pMgmtEps, SEpSet* pQnodeEpSet);
|
||||||
|
|
|
@ -132,13 +132,15 @@ struct SInsertStmtInfo;
|
||||||
bool qIsInsertSql(const char* pStr, size_t length);
|
bool qIsInsertSql(const char* pStr, size_t length);
|
||||||
|
|
||||||
typedef struct SParseContext {
|
typedef struct SParseContext {
|
||||||
|
const char* pAcctId;
|
||||||
|
const char* pDbname;
|
||||||
|
void *pRpc;
|
||||||
|
const char* pClusterId;
|
||||||
|
const SEpSet* pEpSet;
|
||||||
|
int64_t id; // query id, generated by uuid generator
|
||||||
|
int8_t schemaAttached; // denote if submit block is built with table schema or not
|
||||||
const char* pSql; // sql string
|
const char* pSql; // sql string
|
||||||
size_t sqlLen; // length of the sql string
|
size_t sqlLen; // length of the sql string
|
||||||
int64_t id; // operator id, generated by uuid generator
|
|
||||||
const char* pDbname;
|
|
||||||
const SEpSet* pEpSet;
|
|
||||||
int8_t schemaAttached; // denote if submit block is built with table schema or not
|
|
||||||
|
|
||||||
char* pMsg; // extended error message if exists to help avoid the problem in sql statement.
|
char* pMsg; // extended error message if exists to help avoid the problem in sql statement.
|
||||||
int32_t msgLen; // max length of the msg
|
int32_t msgLen; // max length of the msg
|
||||||
} SParseContext;
|
} SParseContext;
|
||||||
|
|
|
@ -20,52 +20,92 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "taosmsg.h"
|
||||||
|
|
||||||
#define QUERY_TYPE_MERGE 1
|
#define QUERY_TYPE_MERGE 1
|
||||||
#define QUERY_TYPE_PARTIAL 2
|
#define QUERY_TYPE_PARTIAL 2
|
||||||
#define QUERY_TYPE_SCAN 3
|
#define QUERY_TYPE_SCAN 3
|
||||||
|
|
||||||
enum OPERATOR_TYPE_E {
|
enum OPERATOR_TYPE_E {
|
||||||
OP_TableScan = 1,
|
OP_Unknown,
|
||||||
OP_DataBlocksOptScan = 2,
|
#define INCLUDE_AS_ENUM
|
||||||
OP_TableSeqScan = 3,
|
#include "plannerOp.h"
|
||||||
OP_TagScan = 4,
|
#undef INCLUDE_AS_ENUM
|
||||||
OP_TableBlockInfoScan= 5,
|
OP_TotalNum
|
||||||
OP_Aggregate = 6,
|
|
||||||
OP_Project = 7,
|
|
||||||
OP_Groupby = 8,
|
|
||||||
OP_Limit = 9,
|
|
||||||
OP_SLimit = 10,
|
|
||||||
OP_TimeWindow = 11,
|
|
||||||
OP_SessionWindow = 12,
|
|
||||||
OP_StateWindow = 22,
|
|
||||||
OP_Fill = 13,
|
|
||||||
OP_MultiTableAggregate = 14,
|
|
||||||
OP_MultiTableTimeInterval = 15,
|
|
||||||
// OP_DummyInput = 16, //TODO remove it after fully refactor.
|
|
||||||
// OP_MultiwayMergeSort = 17, // multi-way data merge into one input stream.
|
|
||||||
// OP_GlobalAggregate = 18, // global merge for the multi-way data sources.
|
|
||||||
OP_Filter = 19,
|
|
||||||
OP_Distinct = 20,
|
|
||||||
OP_Join = 21,
|
|
||||||
OP_AllTimeWindow = 23,
|
|
||||||
OP_AllMultiTableTimeInterval = 24,
|
|
||||||
OP_Order = 25,
|
|
||||||
OP_Exchange = 26,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SEpSet;
|
struct SEpSet;
|
||||||
struct SQueryPlanNode;
|
|
||||||
struct SPhyNode;
|
|
||||||
struct SQueryStmtInfo;
|
struct SQueryStmtInfo;
|
||||||
|
|
||||||
|
typedef SSchema SSlotSchema;
|
||||||
|
|
||||||
|
typedef struct SDataBlockSchema {
|
||||||
|
SSlotSchema *pSchema;
|
||||||
|
int32_t numOfCols; // number of columns
|
||||||
|
} SDataBlockSchema;
|
||||||
|
|
||||||
|
typedef struct SQueryNodeBasicInfo {
|
||||||
|
int32_t type; // operator type
|
||||||
|
const char *name; // operator name
|
||||||
|
} SQueryNodeBasicInfo;
|
||||||
|
|
||||||
|
typedef struct SPhyNode {
|
||||||
|
SQueryNodeBasicInfo info;
|
||||||
|
SArray *pTargets; // target list to be computed or scanned at this node
|
||||||
|
SArray *pConditions; // implicitly-ANDed qual conditions
|
||||||
|
SDataBlockSchema targetSchema;
|
||||||
|
// children plan to generated result for current node to process
|
||||||
|
// in case of join, multiple plan nodes exist.
|
||||||
|
SArray *pChildren;
|
||||||
|
struct SPhyNode *pParent;
|
||||||
|
} SPhyNode;
|
||||||
|
|
||||||
|
typedef struct SScanPhyNode {
|
||||||
|
SPhyNode node;
|
||||||
|
uint64_t uid; // unique id of the table
|
||||||
|
int8_t tableType;
|
||||||
|
} SScanPhyNode;
|
||||||
|
|
||||||
|
typedef SScanPhyNode SSystemTableScanPhyNode;
|
||||||
|
typedef SScanPhyNode STagScanPhyNode;
|
||||||
|
|
||||||
|
typedef struct STableScanPhyNode {
|
||||||
|
SScanPhyNode scan;
|
||||||
|
uint8_t scanFlag; // denotes reversed scan of data or not
|
||||||
|
STimeWindow window;
|
||||||
|
SArray *pTagsConditions; // implicitly-ANDed tag qual conditions
|
||||||
|
} STableScanPhyNode;
|
||||||
|
|
||||||
|
typedef STableScanPhyNode STableSeqScanPhyNode;
|
||||||
|
|
||||||
|
typedef struct SProjectPhyNode {
|
||||||
|
SPhyNode node;
|
||||||
|
} SProjectPhyNode;
|
||||||
|
|
||||||
|
typedef struct SExchangePhyNode {
|
||||||
|
SPhyNode node;
|
||||||
|
uint64_t templateId;
|
||||||
|
SArray *pSourceEpSet; // SEpSet
|
||||||
|
} SExchangePhyNode;
|
||||||
|
|
||||||
|
typedef struct SSubplanId {
|
||||||
|
uint64_t queryId;
|
||||||
|
uint64_t templateId;
|
||||||
|
uint64_t subplanId;
|
||||||
|
} SSubplanId;
|
||||||
|
|
||||||
typedef struct SSubplan {
|
typedef struct SSubplan {
|
||||||
int32_t type; // QUERY_TYPE_MERGE|QUERY_TYPE_PARTIAL|QUERY_TYPE_SCAN
|
SSubplanId id; // unique id of the subplan
|
||||||
SArray *pDatasource; // the datasource subplan,from which to fetch the result
|
int32_t type; // QUERY_TYPE_MERGE|QUERY_TYPE_PARTIAL|QUERY_TYPE_SCAN
|
||||||
struct SPhyNode *pNode; // physical plan of current subplan
|
int32_t level; // the execution level of current subplan, starting from 0.
|
||||||
|
SEpSet execEpSet; // for the scan sub plan, the optional execution node
|
||||||
|
SArray *pChildern; // the datasource subplan,from which to fetch the result
|
||||||
|
SArray *pParents; // the data destination subplan, get data from current subplan
|
||||||
|
SPhyNode *pNode; // physical plan of current subplan
|
||||||
} SSubplan;
|
} SSubplan;
|
||||||
|
|
||||||
typedef struct SQueryDag {
|
typedef struct SQueryDag {
|
||||||
SArray **pSubplans;
|
SArray *pSubplans; // Element is SArray*, and nested element is SSubplan. The execution level of subplan, starting from 0.
|
||||||
} SQueryDag;
|
} SQueryDag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -75,6 +115,7 @@ int32_t qCreateQueryDag(const struct SQueryStmtInfo* pQueryInfo, struct SEpSet*
|
||||||
|
|
||||||
int32_t qExplainQuery(const struct SQueryStmtInfo* pQueryInfo, struct SEpSet* pQnode, char** str);
|
int32_t qExplainQuery(const struct SQueryStmtInfo* pQueryInfo, struct SEpSet* pQnode, char** str);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert to subplan to string for the scheduler to send to the executor
|
* Convert to subplan to string for the scheduler to send to the executor
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2019 TAOS Data, Inc. <jhtao@taosdata.com>
|
||||||
|
*
|
||||||
|
* This program is free software: you can use, redistribute, and/or modify
|
||||||
|
* it under the terms of the GNU Affero General Public License, version 3
|
||||||
|
* or later ("AGPL"), as published by the Free Software Foundation.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Affero General Public License
|
||||||
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if defined(INCLUDE_AS_ENUM) // enum define mode
|
||||||
|
#undef OP_ENUM_MACRO
|
||||||
|
#define OP_ENUM_MACRO(op) OP_##op,
|
||||||
|
#elif defined(INCLUDE_AS_NAME) // comment define mode
|
||||||
|
#undef OP_ENUM_MACRO
|
||||||
|
#define OP_ENUM_MACRO(op) #op,
|
||||||
|
#else
|
||||||
|
#error To use this include file, first define either INCLUDE_AS_ENUM or INCLUDE_AS_NAME
|
||||||
|
#endif
|
||||||
|
|
||||||
|
OP_ENUM_MACRO(TableScan)
|
||||||
|
OP_ENUM_MACRO(DataBlocksOptScan)
|
||||||
|
OP_ENUM_MACRO(TableSeqScan)
|
||||||
|
OP_ENUM_MACRO(TagScan)
|
||||||
|
OP_ENUM_MACRO(TableBlockInfoScan)
|
||||||
|
OP_ENUM_MACRO(Aggregate)
|
||||||
|
OP_ENUM_MACRO(Project)
|
||||||
|
OP_ENUM_MACRO(Groupby)
|
||||||
|
OP_ENUM_MACRO(Limit)
|
||||||
|
OP_ENUM_MACRO(SLimit)
|
||||||
|
OP_ENUM_MACRO(TimeWindow)
|
||||||
|
OP_ENUM_MACRO(SessionWindow)
|
||||||
|
OP_ENUM_MACRO(StateWindow)
|
||||||
|
OP_ENUM_MACRO(Fill)
|
||||||
|
OP_ENUM_MACRO(MultiTableAggregate)
|
||||||
|
OP_ENUM_MACRO(MultiTableTimeInterval)
|
||||||
|
OP_ENUM_MACRO(Filter)
|
||||||
|
OP_ENUM_MACRO(Distinct)
|
||||||
|
OP_ENUM_MACRO(Join)
|
||||||
|
OP_ENUM_MACRO(AllTimeWindow)
|
||||||
|
OP_ENUM_MACRO(AllMultiTableTimeInterval)
|
||||||
|
OP_ENUM_MACRO(Order)
|
||||||
|
OP_ENUM_MACRO(Exchange)
|
|
@ -21,21 +21,66 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "tarray.h"
|
#include "tarray.h"
|
||||||
|
#include "thash.h"
|
||||||
|
|
||||||
typedef SVgroupListRspMsg SVgroupListInfo;
|
typedef SVgroupListRspMsg SVgroupListInfo;
|
||||||
|
|
||||||
|
typedef struct STableComInfo {
|
||||||
|
uint8_t numOfTags; // the number of tags in schema
|
||||||
|
uint8_t precision; // the number of precision
|
||||||
|
int16_t numOfColumns; // the number of columns
|
||||||
|
int32_t rowSize; // row size of the schema
|
||||||
|
} STableComInfo;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ASSERT(sizeof(SCTableMeta) == 24)
|
||||||
|
* ASSERT(tableType == TSDB_CHILD_TABLE)
|
||||||
|
* The cached child table meta info. For each child table, 24 bytes are required to keep the essential table info.
|
||||||
|
*/
|
||||||
|
typedef struct SCTableMeta {
|
||||||
|
int32_t vgId:24;
|
||||||
|
int8_t tableType;
|
||||||
|
uint64_t uid;
|
||||||
|
uint64_t suid;
|
||||||
|
} SCTableMeta;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Note that the first 24 bytes of STableMeta are identical to SCTableMeta, it is safe to cast a STableMeta to be a SCTableMeta.
|
||||||
|
*/
|
||||||
|
typedef struct STableMeta {
|
||||||
|
//BEGIN: KEEP THIS PART SAME WITH SCTableMeta
|
||||||
|
int32_t vgId:24;
|
||||||
|
int8_t tableType;
|
||||||
|
uint64_t uid;
|
||||||
|
uint64_t suid;
|
||||||
|
//END: KEEP THIS PART SAME WITH SCTableMeta
|
||||||
|
|
||||||
|
// if the table is TSDB_CHILD_TABLE, the following information is acquired from the corresponding super table meta info
|
||||||
|
int16_t sversion;
|
||||||
|
int16_t tversion;
|
||||||
|
STableComInfo tableInfo;
|
||||||
|
SSchema schema[];
|
||||||
|
} STableMeta;
|
||||||
|
|
||||||
|
|
||||||
typedef struct SDBVgroupInfo {
|
typedef struct SDBVgroupInfo {
|
||||||
int32_t vgroupVersion;
|
int32_t vgVersion;
|
||||||
SArray *vgId;
|
int8_t hashMethod;
|
||||||
int32_t hashRange;
|
SHashObj *vgInfo; //key:vgId, value:SVgroupInfo
|
||||||
} SDBVgroupInfo;
|
} SDBVgroupInfo;
|
||||||
|
|
||||||
typedef struct SUseDbOutput {
|
typedef struct SUseDbOutput {
|
||||||
SVgroupListInfo *vgroupList;
|
char db[TSDB_FULL_DB_NAME_LEN];
|
||||||
char db[TSDB_TABLE_FNAME_LEN];
|
SDBVgroupInfo dbVgroup;
|
||||||
SDBVgroupInfo *dbVgroup;
|
|
||||||
} SUseDbOutput;
|
} SUseDbOutput;
|
||||||
|
|
||||||
|
typedef struct STableMetaOutput {
|
||||||
|
int32_t metaNum;
|
||||||
|
char ctbFname[TSDB_TABLE_FNAME_LEN];
|
||||||
|
char tbFname[TSDB_TABLE_FNAME_LEN];
|
||||||
|
SCTableMeta ctbMeta;
|
||||||
|
STableMeta *tbMeta;
|
||||||
|
} STableMetaOutput;
|
||||||
|
|
||||||
extern int32_t (*queryBuildMsg[TSDB_MSG_TYPE_MAX])(void* input, char **msg, int32_t msgSize, int32_t *msgLen);
|
extern int32_t (*queryBuildMsg[TSDB_MSG_TYPE_MAX])(void* input, char **msg, int32_t msgSize, int32_t *msgLen);
|
||||||
extern int32_t (*queryProcessMsgRsp[TSDB_MSG_TYPE_MAX])(void* output, char *msg, int32_t msgSize);
|
extern int32_t (*queryProcessMsgRsp[TSDB_MSG_TYPE_MAX])(void* output, char *msg, int32_t msgSize);
|
||||||
|
|
|
@ -41,7 +41,7 @@ typedef struct SArray {
|
||||||
* @param elemSize
|
* @param elemSize
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
void* taosArrayInit(size_t size, size_t elemSize);
|
SArray* taosArrayInit(size_t size, size_t elemSize);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
|
|
@ -32,7 +32,6 @@ extern int32_t mDebugFlag;
|
||||||
extern int32_t cDebugFlag;
|
extern int32_t cDebugFlag;
|
||||||
extern int32_t jniDebugFlag;
|
extern int32_t jniDebugFlag;
|
||||||
extern int32_t tmrDebugFlag;
|
extern int32_t tmrDebugFlag;
|
||||||
extern int32_t sdbDebugFlag;
|
|
||||||
extern int32_t httpDebugFlag;
|
extern int32_t httpDebugFlag;
|
||||||
extern int32_t mqttDebugFlag;
|
extern int32_t mqttDebugFlag;
|
||||||
extern int32_t monDebugFlag;
|
extern int32_t monDebugFlag;
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern bool tIsValidSchema(struct SSchema* pSchema, int32_t numOfCols, int32_t numOfTags);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,19 +30,12 @@
|
||||||
// cluster
|
// cluster
|
||||||
char tsFirst[TSDB_EP_LEN] = {0};
|
char tsFirst[TSDB_EP_LEN] = {0};
|
||||||
char tsSecond[TSDB_EP_LEN] = {0};
|
char tsSecond[TSDB_EP_LEN] = {0};
|
||||||
char tsArbitrator[TSDB_EP_LEN] = {0};
|
|
||||||
char tsLocalFqdn[TSDB_FQDN_LEN] = {0};
|
char tsLocalFqdn[TSDB_FQDN_LEN] = {0};
|
||||||
char tsLocalEp[TSDB_EP_LEN] = {0}; // Local End Point, hostname:port
|
char tsLocalEp[TSDB_EP_LEN] = {0}; // Local End Point, hostname:port
|
||||||
uint16_t tsServerPort = 6030;
|
uint16_t tsServerPort = 6030;
|
||||||
int32_t tsStatusInterval = 1; // second
|
int32_t tsStatusInterval = 1; // second
|
||||||
int32_t tsNumOfMnodes = 1;
|
|
||||||
int8_t tsEnableVnodeBak = 1;
|
|
||||||
int8_t tsEnableTelemetryReporting = 0;
|
int8_t tsEnableTelemetryReporting = 0;
|
||||||
int8_t tsArbOnline = 0;
|
|
||||||
int64_t tsArbOnlineTimestamp = TSDB_ARB_DUMMY_TIME;
|
|
||||||
char tsEmail[TSDB_FQDN_LEN] = {0};
|
char tsEmail[TSDB_FQDN_LEN] = {0};
|
||||||
int32_t tsDnodeId = 0;
|
|
||||||
int64_t tsDnodeStartTime = 0;
|
|
||||||
|
|
||||||
// common
|
// common
|
||||||
int32_t tsRpcTimer = 300;
|
int32_t tsRpcTimer = 300;
|
||||||
|
@ -129,59 +122,19 @@ int32_t tsRetrieveBlockingModel = 0;
|
||||||
// last_row(*), first(*), last_row(ts, col1, col2) query, the result fields will be the original column name
|
// last_row(*), first(*), last_row(ts, col1, col2) query, the result fields will be the original column name
|
||||||
int8_t tsKeepOriginalColumnName = 0;
|
int8_t tsKeepOriginalColumnName = 0;
|
||||||
|
|
||||||
// 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;
|
|
||||||
int32_t tsDaysToKeep = TSDB_DEFAULT_KEEP;
|
|
||||||
int32_t tsMinRowsInFileBlock = TSDB_DEFAULT_MIN_ROW_FBLOCK;
|
|
||||||
int32_t tsMaxRowsInFileBlock = TSDB_DEFAULT_MAX_ROW_FBLOCK;
|
|
||||||
int16_t tsCommitTime = TSDB_DEFAULT_COMMIT_TIME; // seconds
|
|
||||||
int32_t tsTimePrecision = TSDB_DEFAULT_PRECISION;
|
|
||||||
int8_t tsCompression = TSDB_DEFAULT_COMP_LEVEL;
|
|
||||||
int8_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;
|
|
||||||
int8_t tsUpdate = TSDB_DEFAULT_DB_UPDATE_OPTION;
|
|
||||||
int8_t tsCacheLastRow = TSDB_DEFAULT_CACHE_LAST_ROW;
|
|
||||||
int32_t tsMaxVgroupsPerDb = 0;
|
|
||||||
int32_t tsTsdbMetaCompactRatio = TSDB_META_COMPACT_RATIO;
|
|
||||||
|
|
||||||
// tsdb config
|
// tsdb config
|
||||||
// For backward compatibility
|
// For backward compatibility
|
||||||
bool tsdbForceKeepFile = false;
|
bool tsdbForceKeepFile = false;
|
||||||
|
|
||||||
// balance
|
// balance
|
||||||
int8_t tsEnableBalance = 1;
|
|
||||||
int8_t tsAlternativeRole = 0;
|
|
||||||
int32_t tsBalanceInterval = 300; // seconds
|
|
||||||
int32_t tsOfflineThreshold = 86400 * 10; // seconds of 10 days
|
|
||||||
int8_t tsEnableFlowCtrl = 1;
|
int8_t tsEnableFlowCtrl = 1;
|
||||||
int8_t tsEnableSlaveQuery = 1;
|
int8_t tsEnableSlaveQuery = 1;
|
||||||
int8_t tsEnableAdjustMaster = 1;
|
int8_t tsEnableAdjustMaster = 1;
|
||||||
|
|
||||||
// restful
|
|
||||||
int32_t tsRestRowLimit = 10240;
|
|
||||||
int8_t tsTelegrafUseFieldNum = 0;
|
|
||||||
|
|
||||||
// mqtt
|
|
||||||
int8_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};
|
|
||||||
char tsMqttPass[TSDB_MQTT_PASS_LEN] = {0};
|
|
||||||
char tsMqttClientId[TSDB_MQTT_CLIENT_ID_LEN] = "TDengineMqttSubscriber";
|
|
||||||
char tsMqttTopic[TSDB_MQTT_TOPIC_LEN] = "/test"; // #
|
|
||||||
|
|
||||||
// monitor
|
// monitor
|
||||||
int8_t tsEnableMonitorModule = 1;
|
|
||||||
char tsMonitorDbName[TSDB_DB_NAME_LEN] = "log";
|
char tsMonitorDbName[TSDB_DB_NAME_LEN] = "log";
|
||||||
char tsInternalPass[] = "secretkey";
|
char tsInternalPass[] = "secretkey";
|
||||||
int32_t tsMonitorInterval = 30; // seconds
|
|
||||||
|
|
||||||
// stream
|
|
||||||
int8_t tsEnableStream = 1;
|
|
||||||
|
|
||||||
// internal
|
// internal
|
||||||
int8_t tsCompactMnodeWal = 0;
|
int8_t tsCompactMnodeWal = 0;
|
||||||
|
@ -191,7 +144,6 @@ char tsDnodeDir[PATH_MAX] = {0};
|
||||||
char tsMnodeDir[PATH_MAX] = {0};
|
char tsMnodeDir[PATH_MAX] = {0};
|
||||||
|
|
||||||
int32_t tsDiskCfgNum = 0;
|
int32_t tsDiskCfgNum = 0;
|
||||||
int32_t tsTopicBianryLen = 16000;
|
|
||||||
|
|
||||||
#ifndef _STORAGE
|
#ifndef _STORAGE
|
||||||
SDiskCfg tsDiskCfg[1];
|
SDiskCfg tsDiskCfg[1];
|
||||||
|
@ -245,14 +197,10 @@ static pthread_once_t tsInitGlobalCfgOnce = PTHREAD_ONCE_INIT;
|
||||||
void taosSetAllDebugFlag() {
|
void taosSetAllDebugFlag() {
|
||||||
if (debugFlag != 0) {
|
if (debugFlag != 0) {
|
||||||
mDebugFlag = debugFlag;
|
mDebugFlag = debugFlag;
|
||||||
sdbDebugFlag = debugFlag;
|
|
||||||
dDebugFlag = debugFlag;
|
dDebugFlag = debugFlag;
|
||||||
vDebugFlag = debugFlag;
|
vDebugFlag = debugFlag;
|
||||||
jniDebugFlag = debugFlag;
|
jniDebugFlag = debugFlag;
|
||||||
odbcDebugFlag = debugFlag;
|
odbcDebugFlag = debugFlag;
|
||||||
httpDebugFlag = debugFlag;
|
|
||||||
mqttDebugFlag = debugFlag;
|
|
||||||
monDebugFlag = debugFlag;
|
|
||||||
qDebugFlag = debugFlag;
|
qDebugFlag = debugFlag;
|
||||||
rpcDebugFlag = debugFlag;
|
rpcDebugFlag = debugFlag;
|
||||||
uDebugFlag = debugFlag;
|
uDebugFlag = debugFlag;
|
||||||
|
@ -459,16 +407,6 @@ static void doInitGlobalConfig(void) {
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||||
taosAddConfigOption(cfg);
|
taosAddConfigOption(cfg);
|
||||||
|
|
||||||
cfg.option = "arbitrator";
|
|
||||||
cfg.ptr = tsArbitrator;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_STRING;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW | TSDB_CFG_CTYPE_B_CLIENT;
|
|
||||||
cfg.minValue = 0;
|
|
||||||
cfg.maxValue = 0;
|
|
||||||
cfg.ptrLength = TSDB_EP_LEN;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
// dnode configs
|
// dnode configs
|
||||||
cfg.option = "numOfThreadsPerCore";
|
cfg.option = "numOfThreadsPerCore";
|
||||||
cfg.ptr = &tsNumOfThreadsPerCore;
|
cfg.ptr = &tsNumOfThreadsPerCore;
|
||||||
|
@ -509,26 +447,6 @@ static void doInitGlobalConfig(void) {
|
||||||
cfg.ptrLength = 0;
|
cfg.ptrLength = 0;
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||||
taosAddConfigOption(cfg);
|
taosAddConfigOption(cfg);
|
||||||
|
|
||||||
cfg.option = "numOfMnodes";
|
|
||||||
cfg.ptr = &tsNumOfMnodes;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = 1;
|
|
||||||
cfg.maxValue = 3;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "vnodeBak";
|
|
||||||
cfg.ptr = &tsEnableVnodeBak;
|
|
||||||
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 = 1;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "telemetryReporting";
|
cfg.option = "telemetryReporting";
|
||||||
cfg.ptr = &tsEnableTelemetryReporting;
|
cfg.ptr = &tsEnableTelemetryReporting;
|
||||||
|
@ -540,37 +458,6 @@ static void doInitGlobalConfig(void) {
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||||
taosAddConfigOption(cfg);
|
taosAddConfigOption(cfg);
|
||||||
|
|
||||||
cfg.option = "balance";
|
|
||||||
cfg.ptr = &tsEnableBalance;
|
|
||||||
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 = 1;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "balanceInterval";
|
|
||||||
cfg.ptr = &tsBalanceInterval;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = 1;
|
|
||||||
cfg.maxValue = 30000;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
// 0-any; 1-mnode; 2-vnode
|
|
||||||
cfg.option = "role";
|
|
||||||
cfg.ptr = &tsAlternativeRole;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT8;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG;
|
|
||||||
cfg.minValue = 0;
|
|
||||||
cfg.maxValue = 2;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
// timer
|
// timer
|
||||||
cfg.option = "maxTmrCtrl";
|
cfg.option = "maxTmrCtrl";
|
||||||
cfg.ptr = &tsMaxTmrCtrl;
|
cfg.ptr = &tsMaxTmrCtrl;
|
||||||
|
@ -582,26 +469,6 @@ static void doInitGlobalConfig(void) {
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||||
taosAddConfigOption(cfg);
|
taosAddConfigOption(cfg);
|
||||||
|
|
||||||
cfg.option = "monitorInterval";
|
|
||||||
cfg.ptr = &tsMonitorInterval;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG;
|
|
||||||
cfg.minValue = 1;
|
|
||||||
cfg.maxValue = 600;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_SECOND;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "offlineThreshold";
|
|
||||||
cfg.ptr = &tsOfflineThreshold;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = 3;
|
|
||||||
cfg.maxValue = 86400 * 365;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_SECOND;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "rpcTimer";
|
cfg.option = "rpcTimer";
|
||||||
cfg.ptr = &tsRpcTimer;
|
cfg.ptr = &tsRpcTimer;
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
||||||
|
@ -712,186 +579,6 @@ static void doInitGlobalConfig(void) {
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||||
taosAddConfigOption(cfg);
|
taosAddConfigOption(cfg);
|
||||||
|
|
||||||
cfg.option = "maxVgroupsPerDb";
|
|
||||||
cfg.ptr = &tsMaxVgroupsPerDb;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = 0;
|
|
||||||
cfg.maxValue = 8192;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "cache";
|
|
||||||
cfg.ptr = &tsCacheBlockSize;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = TSDB_MIN_CACHE_BLOCK_SIZE;
|
|
||||||
cfg.maxValue = TSDB_MAX_CACHE_BLOCK_SIZE;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_MB;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "blocks";
|
|
||||||
cfg.ptr = &tsBlocksPerVnode;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = TSDB_MIN_TOTAL_BLOCKS;
|
|
||||||
cfg.maxValue = TSDB_MAX_TOTAL_BLOCKS;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "days";
|
|
||||||
cfg.ptr = &tsDaysPerFile;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT16;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = TSDB_MIN_DAYS_PER_FILE;
|
|
||||||
cfg.maxValue = TSDB_MAX_DAYS_PER_FILE;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "keep";
|
|
||||||
cfg.ptr = &tsDaysToKeep;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = TSDB_MIN_KEEP;
|
|
||||||
cfg.maxValue = TSDB_MAX_KEEP;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "minRows";
|
|
||||||
cfg.ptr = &tsMinRowsInFileBlock;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = TSDB_MIN_MIN_ROW_FBLOCK;
|
|
||||||
cfg.maxValue = TSDB_MAX_MIN_ROW_FBLOCK;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "maxRows";
|
|
||||||
cfg.ptr = &tsMaxRowsInFileBlock;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = TSDB_MIN_MAX_ROW_FBLOCK;
|
|
||||||
cfg.maxValue = TSDB_MAX_MAX_ROW_FBLOCK;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "precision";
|
|
||||||
cfg.ptr = &tsTimePrecision;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT8;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = TSDB_MIN_PRECISION;
|
|
||||||
cfg.maxValue = TSDB_MAX_PRECISION;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "comp";
|
|
||||||
cfg.ptr = &tsCompression;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT8;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = TSDB_MIN_COMP_LEVEL;
|
|
||||||
cfg.maxValue = TSDB_MAX_COMP_LEVEL;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "walLevel";
|
|
||||||
cfg.ptr = &tsWAL;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT8;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = TSDB_MIN_WAL_LEVEL;
|
|
||||||
cfg.maxValue = TSDB_MAX_WAL_LEVEL;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "fsync";
|
|
||||||
cfg.ptr = &tsFsyncPeriod;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = TSDB_MIN_FSYNC_PERIOD;
|
|
||||||
cfg.maxValue = TSDB_MAX_FSYNC_PERIOD;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "replica";
|
|
||||||
cfg.ptr = &tsReplications;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = TSDB_MIN_DB_REPLICA_OPTION;
|
|
||||||
cfg.maxValue = TSDB_MAX_DB_REPLICA_OPTION;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "quorum";
|
|
||||||
cfg.ptr = &tsQuorum;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = TSDB_MIN_DB_QUORUM_OPTION;
|
|
||||||
cfg.maxValue = TSDB_MAX_DB_QUORUM_OPTION;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "update";
|
|
||||||
cfg.ptr = &tsUpdate;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT8;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = TSDB_MIN_DB_UPDATE;
|
|
||||||
cfg.maxValue = TSDB_MAX_DB_UPDATE;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "cachelast";
|
|
||||||
cfg.ptr = &tsCacheLastRow;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT8;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
|
|
||||||
cfg.minValue = TSDB_MIN_DB_CACHE_LAST_ROW;
|
|
||||||
cfg.maxValue = TSDB_MAX_DB_CACHE_LAST_ROW;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "mqttHostName";
|
|
||||||
cfg.ptr = tsMqttHostName;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_STRING;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_NOT_PRINT;
|
|
||||||
cfg.minValue = 0;
|
|
||||||
cfg.maxValue = 0;
|
|
||||||
cfg.ptrLength = TSDB_MQTT_HOSTNAME_LEN;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "mqttPort";
|
|
||||||
cfg.ptr = tsMqttPort;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_STRING;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_NOT_PRINT;
|
|
||||||
cfg.minValue = 0;
|
|
||||||
cfg.maxValue = 0;
|
|
||||||
cfg.ptrLength = TSDB_MQTT_PORT_LEN;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "mqttTopic";
|
|
||||||
cfg.ptr = tsMqttTopic;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_STRING;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_NOT_PRINT;
|
|
||||||
cfg.minValue = 0;
|
|
||||||
cfg.maxValue = 0;
|
|
||||||
cfg.ptrLength = TSDB_MQTT_TOPIC_LEN;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "compressMsgSize";
|
cfg.option = "compressMsgSize";
|
||||||
cfg.ptr = &tsCompressMsgSize;
|
cfg.ptr = &tsCompressMsgSize;
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
||||||
|
@ -1085,76 +772,6 @@ static void doInitGlobalConfig(void) {
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||||
taosAddConfigOption(cfg);
|
taosAddConfigOption(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;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "mqtt";
|
|
||||||
cfg.ptr = &tsEnableMqttModule;
|
|
||||||
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 = 1;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "monitor";
|
|
||||||
cfg.ptr = &tsEnableMonitorModule;
|
|
||||||
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 = 1;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "stream";
|
|
||||||
cfg.ptr = &tsEnableStream;
|
|
||||||
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 = 1;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "topicBianryLen";
|
|
||||||
cfg.ptr = &tsTopicBianryLen;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG;
|
|
||||||
cfg.minValue = 16;
|
|
||||||
cfg.maxValue = 16000;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "telegrafUseFieldNum";
|
|
||||||
cfg.ptr = &tsTelegrafUseFieldNum;
|
|
||||||
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 = 1;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "restfulRowLimit";
|
|
||||||
cfg.ptr = &tsRestRowLimit;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG;
|
|
||||||
cfg.minValue = 1;
|
|
||||||
cfg.maxValue = 10000000;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
// debug flag
|
// debug flag
|
||||||
cfg.option = "numOfLogLines";
|
cfg.option = "numOfLogLines";
|
||||||
cfg.ptr = &tsNumOfLogLines;
|
cfg.ptr = &tsNumOfLogLines;
|
||||||
|
@ -1236,17 +853,6 @@ static void doInitGlobalConfig(void) {
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||||
taosAddConfigOption(cfg);
|
taosAddConfigOption(cfg);
|
||||||
|
|
||||||
|
|
||||||
cfg.option = "sdbDebugFlag";
|
|
||||||
cfg.ptr = &sdbDebugFlag;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG;
|
|
||||||
cfg.minValue = 0;
|
|
||||||
cfg.maxValue = 255;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "rpcDebugFlag";
|
cfg.option = "rpcDebugFlag";
|
||||||
cfg.ptr = &rpcDebugFlag;
|
cfg.ptr = &rpcDebugFlag;
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
||||||
|
@ -1307,36 +913,6 @@ static void doInitGlobalConfig(void) {
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||||
taosAddConfigOption(cfg);
|
taosAddConfigOption(cfg);
|
||||||
|
|
||||||
cfg.option = "httpDebugFlag";
|
|
||||||
cfg.ptr = &httpDebugFlag;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG;
|
|
||||||
cfg.minValue = 0;
|
|
||||||
cfg.maxValue = 255;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "mqttDebugFlag";
|
|
||||||
cfg.ptr = &mqttDebugFlag;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG;
|
|
||||||
cfg.minValue = 0;
|
|
||||||
cfg.maxValue = 255;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "monDebugFlag";
|
|
||||||
cfg.ptr = &monDebugFlag;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_LOG;
|
|
||||||
cfg.minValue = 0;
|
|
||||||
cfg.maxValue = 255;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "qDebugFlag";
|
cfg.option = "qDebugFlag";
|
||||||
cfg.ptr = &qDebugFlag;
|
cfg.ptr = &qDebugFlag;
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
||||||
|
@ -1456,16 +1032,6 @@ static void doInitGlobalConfig(void) {
|
||||||
cfg.maxValue = 0;
|
cfg.maxValue = 0;
|
||||||
cfg.ptrLength = PATH_MAX;
|
cfg.ptrLength = PATH_MAX;
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||||
taosAddConfigOption(cfg);
|
|
||||||
|
|
||||||
cfg.option = "tsdbMetaCompactRatio";
|
|
||||||
cfg.ptr = &tsTsdbMetaCompactRatio;
|
|
||||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
|
||||||
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG;
|
|
||||||
cfg.minValue = 0;
|
|
||||||
cfg.maxValue = 100;
|
|
||||||
cfg.ptrLength = 0;
|
|
||||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
|
||||||
taosAddConfigOption(cfg);
|
taosAddConfigOption(cfg);
|
||||||
|
|
||||||
// enable kill long query
|
// enable kill long query
|
||||||
|
@ -1630,4 +1196,3 @@ bool taosCheckBalanceCfgOptions(const char *option, int32_t *vnodeId, int32_t *d
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|