TD-12035 merge 3.0
This commit is contained in:
commit
a9b1fb0f4d
|
@ -168,8 +168,8 @@ typedef enum _mgmt_table {
|
|||
TSDB_MGMT_TABLE_SCORES,
|
||||
TSDB_MGMT_TABLE_GRANTS,
|
||||
TSDB_MGMT_TABLE_VNODES,
|
||||
TSDB_MGMT_TABLE_STREAMTABLES,
|
||||
TSDB_MGMT_TABLE_CLUSTER,
|
||||
TSDB_MGMT_TABLE_STREAMTABLES,
|
||||
TSDB_MGMT_TABLE_TP,
|
||||
TSDB_MGMT_TABLE_FUNCTION,
|
||||
TSDB_MGMT_TABLE_MAX,
|
||||
|
@ -396,17 +396,20 @@ typedef struct {
|
|||
int32_t maxDbs;
|
||||
int32_t maxTimeSeries;
|
||||
int32_t maxStreams;
|
||||
int64_t maxStorage; // In unit of GB
|
||||
int32_t accessState; // Configured only by command
|
||||
int64_t maxStorage; // In unit of GB
|
||||
int32_t reserve[8];
|
||||
} SCreateAcctMsg, SAlterAcctMsg;
|
||||
|
||||
typedef struct {
|
||||
char user[TSDB_USER_LEN];
|
||||
char user[TSDB_USER_LEN];
|
||||
int32_t reserve[8];
|
||||
} SDropUserMsg, SDropAcctMsg;
|
||||
|
||||
typedef struct {
|
||||
char user[TSDB_USER_LEN];
|
||||
char pass[TSDB_PASSWORD_LEN];
|
||||
char user[TSDB_USER_LEN];
|
||||
char pass[TSDB_PASSWORD_LEN];
|
||||
int32_t reserve[8];
|
||||
} SCreateUserMsg, SAlterUserMsg;
|
||||
|
||||
typedef struct {
|
||||
|
@ -629,7 +632,6 @@ typedef struct {
|
|||
int32_t reserve[8];
|
||||
} SUseDbMsg;
|
||||
|
||||
|
||||
typedef struct {
|
||||
char db[TSDB_TABLE_FNAME_LEN];
|
||||
int32_t reserve[8];
|
||||
|
@ -839,7 +841,7 @@ typedef struct {
|
|||
int32_t tversion;
|
||||
uint64_t tuid;
|
||||
uint64_t suid;
|
||||
SVgroupMsg vgroup;
|
||||
int32_t vgId;
|
||||
SSchema pSchema[];
|
||||
} STableMetaMsg;
|
||||
|
||||
|
@ -867,6 +869,7 @@ typedef struct {
|
|||
int32_t dbVgroupVersion;
|
||||
int32_t dbVgroupNum;
|
||||
int32_t dbHashRange;
|
||||
int32_t dbHashType;
|
||||
SVgroupInfo vgroupInfo[];
|
||||
//int32_t vgIdList[];
|
||||
} SUseDbRspMsg;
|
||||
|
@ -897,16 +900,19 @@ typedef struct SShowRsp {
|
|||
} SShowRsp;
|
||||
|
||||
typedef struct {
|
||||
char ep[TSDB_EP_LEN]; // end point, hostname:port
|
||||
char ep[TSDB_EP_LEN]; // end point, hostname:port
|
||||
int32_t reserve[8];
|
||||
} SCreateDnodeMsg;
|
||||
|
||||
typedef struct {
|
||||
int32_t dnodeId;
|
||||
int32_t reserve[8];
|
||||
} SDropDnodeMsg;
|
||||
|
||||
typedef struct {
|
||||
int32_t dnodeId;
|
||||
char config[TSDB_DNODE_CONFIG_LEN];
|
||||
int32_t reserve[8];
|
||||
} SCfgDnodeMsg;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -29,12 +29,7 @@ extern char tsLocalFqdn[];
|
|||
extern char tsLocalEp[];
|
||||
extern uint16_t tsServerPort;
|
||||
extern int32_t tsStatusInterval;
|
||||
extern int32_t tsNumOfMnodes;
|
||||
extern int8_t tsEnableVnodeBak;
|
||||
extern int8_t tsEnableTelemetryReporting;
|
||||
extern char tsArbitrator[];
|
||||
extern int8_t tsArbOnline;
|
||||
extern int64_t tsArbOnlineTimestamp;
|
||||
|
||||
// common
|
||||
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 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 int8_t tsKeepOriginalColumnName;
|
||||
|
||||
// client
|
||||
|
@ -78,66 +72,15 @@ extern float tsStreamComputDelayRatio; // the delayed computing ration of the
|
|||
extern int32_t tsProjectExecInterval;
|
||||
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
|
||||
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 tsEnableAdjustMaster;
|
||||
|
||||
// restful
|
||||
extern int32_t tsRestRowLimit;
|
||||
extern int8_t tsTelegrafUseFieldNum;
|
||||
|
||||
// mqtt
|
||||
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
|
||||
// interna
|
||||
extern int8_t tsPrintAuth;
|
||||
extern char tsVnodeDir[];
|
||||
extern char tsMnodeDir[];
|
||||
extern int64_t tsTickPerDay[3];
|
||||
extern int32_t tsTopicBianryLen;
|
||||
|
||||
// system info
|
||||
extern float tsTotalLogDirGB;
|
||||
|
|
|
@ -99,7 +99,7 @@ extern "C" {
|
|||
sdbFreeRaw(pRaw); \
|
||||
return NULL; \
|
||||
} \
|
||||
dataPos += sizeof(int16_t); \
|
||||
dataPos += sizeof(int16_t); \
|
||||
}
|
||||
|
||||
#define SDB_SET_INT8(pRaw, dataPos, val) \
|
||||
|
@ -295,6 +295,15 @@ void sdbCancelFetch(SSdb *pSdb, void *pIter);
|
|||
*/
|
||||
int32_t sdbGetSize(SSdb *pSdb, ESdbType type);
|
||||
|
||||
/**
|
||||
* @brief Get the max id of the table, keyType of table should be INT32
|
||||
*
|
||||
* @param pSdb The sdb object.
|
||||
* @param pIter The type of the table.
|
||||
* @record int32_t The max id of the table
|
||||
*/
|
||||
int32_t sdbGetMaxId(SSdb *pSdb, ESdbType type);
|
||||
|
||||
SSdbRaw *sdbAllocRaw(ESdbType type, int8_t sver, int32_t dataLen);
|
||||
void sdbFreeRaw(SSdbRaw *pRaw);
|
||||
int32_t sdbSetRawInt8(SSdbRaw *pRaw, int32_t dataPos, int8_t val);
|
||||
|
|
|
@ -226,21 +226,21 @@ typedef struct TqMetaHandle {
|
|||
int64_t serializedSize;
|
||||
void* valueInUse;
|
||||
void* valueInTxn;
|
||||
} TqMetaHandle;
|
||||
} STqMetaHandle;
|
||||
|
||||
typedef struct TqMetaList {
|
||||
TqMetaHandle handle;
|
||||
STqMetaHandle handle;
|
||||
struct TqMetaList* next;
|
||||
//struct TqMetaList* inTxnPrev;
|
||||
//struct TqMetaList* inTxnNext;
|
||||
struct TqMetaList* unpersistPrev;
|
||||
struct TqMetaList* unpersistNext;
|
||||
} TqMetaList;
|
||||
} STqMetaList;
|
||||
|
||||
typedef struct TqMetaStore {
|
||||
TqMetaList* bucket[TQ_BUCKET_SIZE];
|
||||
STqMetaList* bucket[TQ_BUCKET_SIZE];
|
||||
//a table head
|
||||
TqMetaList* unpersistHead;
|
||||
STqMetaList* unpersistHead;
|
||||
//TODO:temporaral use, to be replaced by unified tfile
|
||||
int fileFd;
|
||||
//TODO:temporaral use, to be replaced by unified tfile
|
||||
|
@ -250,7 +250,7 @@ typedef struct TqMetaStore {
|
|||
TqSerializeFun pSerializer;
|
||||
TqDeserializeFun pDeserializer;
|
||||
TqDeleteFun pDeleter;
|
||||
} TqMetaStore;
|
||||
} STqMetaStore;
|
||||
|
||||
typedef struct STQ {
|
||||
// the collection of group handle
|
||||
|
@ -259,7 +259,7 @@ typedef struct STQ {
|
|||
STqCfg* tqConfig;
|
||||
TqLogReader* tqLogReader;
|
||||
TqMemRef tqMemRef;
|
||||
TqMetaStore* tqMeta;
|
||||
STqMetaStore* tqMeta;
|
||||
} STQ;
|
||||
|
||||
// open in each vnode
|
||||
|
|
|
@ -21,15 +21,14 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
// TYPES EXPOSED
|
||||
typedef struct STsdb STsdb;
|
||||
typedef struct STsdbCfg STsdbCfg;
|
||||
typedef struct STsdbMemAllocator STsdbMemAllocator;
|
||||
typedef struct STsdb STsdb;
|
||||
typedef struct STsdbCfg STsdbCfg;
|
||||
|
||||
// STsdb
|
||||
STsdb *tsdbOpen(const char *path, const STsdbCfg *);
|
||||
STsdb *tsdbOpen(const char *path, const STsdbCfg *pTsdbCfg);
|
||||
void tsdbClose(STsdb *);
|
||||
void tsdbRemove(const char *path);
|
||||
int tsdbInsertData(STsdb *pTsdb, void *pData, int len);
|
||||
int tsdbInsertData(STsdb *pTsdb, SSubmitMsg *pMsg);
|
||||
|
||||
// STsdbCfg
|
||||
int tsdbOptionsInit(STsdbCfg *);
|
||||
|
@ -41,7 +40,6 @@ struct STsdbCfg {
|
|||
uint32_t keep0;
|
||||
uint32_t keep1;
|
||||
uint32_t keep2;
|
||||
/* TODO */
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -32,7 +32,7 @@ extern "C" {
|
|||
struct SCatalog;
|
||||
|
||||
typedef struct SCatalogReq {
|
||||
char clusterId[TSDB_CLUSTER_ID_LEN]; //????
|
||||
char dbName[TSDB_DB_NAME_LEN];
|
||||
SArray *pTableName; // table full name
|
||||
SArray *pUdf; // udf name
|
||||
bool qNodeRequired; // valid qnode
|
||||
|
@ -45,42 +45,10 @@ typedef struct SMetaData {
|
|||
SEpSet *pEpSet; // qnode epset list
|
||||
} 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 {
|
||||
|
||||
bool enableVgroupCache;
|
||||
uint32_t maxTblCacheNum;
|
||||
uint32_t maxDBCacheNum;
|
||||
} SCatalogCfg;
|
||||
|
||||
int32_t catalogInit(SCatalogCfg *cfg);
|
||||
|
@ -96,19 +64,25 @@ 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);
|
||||
|
||||
/**
|
||||
* get cluster vgroup list.
|
||||
* @pVgroupList - hash of vgroup list, key:vgId, value:SVgroupInfo
|
||||
* @return
|
||||
*/
|
||||
int32_t catalogGetVgroup(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, SHashObj** pVgroupHash);
|
||||
int32_t catalogUpdateVgroupCache(struct SCatalog* pCatalog, SVgroupListInfo* pVgroup);
|
||||
|
||||
|
||||
|
||||
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 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 catalogRenewTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const STableMeta* pTableMeta);
|
||||
int32_t catalogRenewAndGetTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const STableMeta* pTableMeta, STableMeta* pNewTableMeta);
|
||||
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 char* pDBName, const char* pTableName);
|
||||
int32_t catalogRenewAndGetTableMeta(struct SCatalog* pCatalog, void *pRpc, const SEpSet* pMgmtEps, const char* pDBName, const char* pTableName, STableMeta** pTableMeta);
|
||||
|
||||
|
||||
/**
|
||||
|
@ -117,7 +91,7 @@ int32_t catalogRenewAndGetTableMeta(struct SCatalog* pCatalog, void *pRpc, const
|
|||
* @pVgroupList - array of SVgroupInfo
|
||||
* @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 +103,7 @@ int32_t catalogGetTableVgroup(struct SCatalog* pCatalog, void *pRpc, const SEpSe
|
|||
* @param pMetaData
|
||||
* @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);
|
||||
|
|
|
@ -24,10 +24,49 @@ extern "C" {
|
|||
|
||||
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 {
|
||||
int32_t vgroupVersion;
|
||||
SArray *vgId;
|
||||
int32_t hashRange;
|
||||
int32_t hashType;
|
||||
} SDBVgroupInfo;
|
||||
|
||||
typedef struct SUseDbOutput {
|
||||
|
@ -36,6 +75,13 @@ typedef struct SUseDbOutput {
|
|||
SDBVgroupInfo *dbVgroup;
|
||||
} 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 (*queryProcessMsgRsp[TSDB_MSG_TYPE_MAX])(void* output, char *msg, int32_t msgSize);
|
||||
|
|
|
@ -88,17 +88,17 @@ typedef struct SWalVer {
|
|||
typedef struct SWal {
|
||||
// cfg
|
||||
SWalCfg cfg;
|
||||
int32_t fsyncSeq;
|
||||
//meta
|
||||
SWalVer vers;
|
||||
//file set
|
||||
int64_t writeLogTfd;
|
||||
int64_t writeIdxTfd;
|
||||
int32_t writeCur;
|
||||
SArray* fileInfoSet;
|
||||
//statistics
|
||||
//status
|
||||
int64_t totSize;
|
||||
int64_t lastRollSeq;
|
||||
//ctl
|
||||
int32_t fsyncSeq;
|
||||
int64_t refId;
|
||||
pthread_mutex_t mutex;
|
||||
//path
|
||||
|
|
|
@ -119,71 +119,91 @@ int32_t* taosGetErrno();
|
|||
#define TSDB_CODE_TSC_VALUE_OUT_OF_RANGE TAOS_DEF_ERROR_CODE(0, 0x0223) //"Value out of range")
|
||||
#define TSDB_CODE_TSC_INVALID_INPUT TAOS_DEF_ERROR_CODE(0, 0X0224) //"Invalid tsc input")
|
||||
|
||||
// mnode
|
||||
#define TSDB_CODE_MND_MSG_NOT_PROCESSED TAOS_DEF_ERROR_CODE(0, 0x0300)
|
||||
#define TSDB_CODE_MND_ACTION_IN_PROGRESS TAOS_DEF_ERROR_CODE(0, 0x0301)
|
||||
#define TSDB_CODE_MND_ACTION_NEED_REPROCESSED TAOS_DEF_ERROR_CODE(0, 0x0302)
|
||||
#define TSDB_CODE_MND_NO_RIGHTS TAOS_DEF_ERROR_CODE(0, 0x0303)
|
||||
#define TSDB_CODE_MND_INVALID_OPTIONS TAOS_DEF_ERROR_CODE(0, 0x0304)
|
||||
#define TSDB_CODE_MND_INVALID_CONNECTION TAOS_DEF_ERROR_CODE(0, 0x0305)
|
||||
#define TSDB_CODE_MND_INVALID_MSG_VERSION TAOS_DEF_ERROR_CODE(0, 0x0306)
|
||||
#define TSDB_CODE_MND_INVALID_MSG_LEN TAOS_DEF_ERROR_CODE(0, 0x0307)
|
||||
#define TSDB_CODE_MND_INVALID_MSG_TYPE TAOS_DEF_ERROR_CODE(0, 0x0308)
|
||||
#define TSDB_CODE_MND_TOO_MANY_SHELL_CONNS TAOS_DEF_ERROR_CODE(0, 0x0309)
|
||||
#define TSDB_CODE_MND_INVALID_SHOWOBJ TAOS_DEF_ERROR_CODE(0, 0x030B)
|
||||
#define TSDB_CODE_MND_INVALID_QUERY_ID TAOS_DEF_ERROR_CODE(0, 0x030C)
|
||||
#define TSDB_CODE_MND_INVALID_STREAM_ID TAOS_DEF_ERROR_CODE(0, 0x030D)
|
||||
#define TSDB_CODE_MND_INVALID_CONN_ID TAOS_DEF_ERROR_CODE(0, 0x030E)
|
||||
#define TSDB_CODE_MND_MNODE_IS_RUNNING TAOS_DEF_ERROR_CODE(0, 0x0310)
|
||||
#define TSDB_CODE_MND_FAILED_TO_CONFIG_SYNC TAOS_DEF_ERROR_CODE(0, 0x0311)
|
||||
#define TSDB_CODE_MND_FAILED_TO_START_SYNC TAOS_DEF_ERROR_CODE(0, 0x0312)
|
||||
#define TSDB_CODE_MND_FAILED_TO_CREATE_DIR TAOS_DEF_ERROR_CODE(0, 0x0313)
|
||||
#define TSDB_CODE_MND_FAILED_TO_INIT_STEP TAOS_DEF_ERROR_CODE(0, 0x0314)
|
||||
// mnode-common
|
||||
#define TSDB_CODE_MND_NOT_READY TAOS_DEF_ERROR_CODE(0, 0x0300)
|
||||
#define TSDB_CODE_MND_MSG_NOT_PROCESSED TAOS_DEF_ERROR_CODE(0, 0x0301)
|
||||
#define TSDB_CODE_MND_ACTION_IN_PROGRESS TAOS_DEF_ERROR_CODE(0, 0x0302)
|
||||
#define TSDB_CODE_MND_ACTION_NEED_REPROCESSED TAOS_DEF_ERROR_CODE(0, 0x0303)
|
||||
#define TSDB_CODE_MND_NO_RIGHTS TAOS_DEF_ERROR_CODE(0, 0x0304)
|
||||
#define TSDB_CODE_MND_INVALID_OPTIONS TAOS_DEF_ERROR_CODE(0, 0x0305)
|
||||
#define TSDB_CODE_MND_INVALID_CONNECTION TAOS_DEF_ERROR_CODE(0, 0x0306)
|
||||
#define TSDB_CODE_MND_INVALID_MSG_VERSION TAOS_DEF_ERROR_CODE(0, 0x0307)
|
||||
#define TSDB_CODE_MND_INVALID_MSG_LEN TAOS_DEF_ERROR_CODE(0, 0x0308)
|
||||
#define TSDB_CODE_MND_INVALID_MSG_TYPE TAOS_DEF_ERROR_CODE(0, 0x0309)
|
||||
#define TSDB_CODE_MND_TOO_MANY_SHELL_CONNS TAOS_DEF_ERROR_CODE(0, 0x030A)
|
||||
|
||||
#define TSDB_CODE_SDB_APP_ERROR TAOS_DEF_ERROR_CODE(0, 0x0320)
|
||||
#define TSDB_CODE_SDB_OBJ_ALREADY_THERE TAOS_DEF_ERROR_CODE(0, 0x0321)
|
||||
#define TSDB_CODE_SDB_OBJ_NOT_THERE TAOS_DEF_ERROR_CODE(0, 0x0322)
|
||||
#define TSDB_CODE_SDB_OBJ_CREATING TAOS_DEF_ERROR_CODE(0, 0x0323)
|
||||
#define TSDB_CODE_SDB_OBJ_DROPPING TAOS_DEF_ERROR_CODE(0, 0x0324)
|
||||
#define TSDB_CODE_SDB_INVALID_TABLE_TYPE TAOS_DEF_ERROR_CODE(0, 0x0325)
|
||||
#define TSDB_CODE_SDB_INVALID_KEY_TYPE TAOS_DEF_ERROR_CODE(0, 0x0326)
|
||||
#define TSDB_CODE_SDB_INVALID_ACTION_TYPE TAOS_DEF_ERROR_CODE(0, 0x0327)
|
||||
#define TSDB_CODE_SDB_INVALID_STATUS_TYPE TAOS_DEF_ERROR_CODE(0, 0x0328)
|
||||
#define TSDB_CODE_SDB_INVALID_DATA_VER TAOS_DEF_ERROR_CODE(0, 0x0329)
|
||||
#define TSDB_CODE_SDB_INVALID_DATA_LEN TAOS_DEF_ERROR_CODE(0, 0x032A)
|
||||
#define TSDB_CODE_SDB_INVALID_DATA_CONTENT TAOS_DEF_ERROR_CODE(0, 0x032B)
|
||||
// mnode-show
|
||||
#define TSDB_CODE_MND_INVALID_SHOWOBJ TAOS_DEF_ERROR_CODE(0, 0x0310)
|
||||
|
||||
// mnode-profile
|
||||
#define TSDB_CODE_MND_INVALID_QUERY_ID TAOS_DEF_ERROR_CODE(0, 0x0320)
|
||||
#define TSDB_CODE_MND_INVALID_STREAM_ID TAOS_DEF_ERROR_CODE(0, 0x0321)
|
||||
#define TSDB_CODE_MND_INVALID_CONN_ID TAOS_DEF_ERROR_CODE(0, 0x0322)
|
||||
#define TSDB_CODE_MND_MNODE_IS_RUNNING TAOS_DEF_ERROR_CODE(0, 0x0323)
|
||||
#define TSDB_CODE_MND_FAILED_TO_CONFIG_SYNC TAOS_DEF_ERROR_CODE(0, 0x0324)
|
||||
#define TSDB_CODE_MND_FAILED_TO_START_SYNC TAOS_DEF_ERROR_CODE(0, 0x0325)
|
||||
#define TSDB_CODE_MND_FAILED_TO_CREATE_DIR TAOS_DEF_ERROR_CODE(0, 0x0326)
|
||||
#define TSDB_CODE_MND_FAILED_TO_INIT_STEP TAOS_DEF_ERROR_CODE(0, 0x0327)
|
||||
|
||||
// mnode-sdb
|
||||
#define TSDB_CODE_SDB_APP_ERROR TAOS_DEF_ERROR_CODE(0, 0x0330)
|
||||
#define TSDB_CODE_SDB_OBJ_ALREADY_THERE TAOS_DEF_ERROR_CODE(0, 0x0331)
|
||||
#define TSDB_CODE_SDB_OBJ_NOT_THERE TAOS_DEF_ERROR_CODE(0, 0x0332)
|
||||
#define TSDB_CODE_SDB_OBJ_CREATING TAOS_DEF_ERROR_CODE(0, 0x0333)
|
||||
#define TSDB_CODE_SDB_OBJ_DROPPING TAOS_DEF_ERROR_CODE(0, 0x0334)
|
||||
#define TSDB_CODE_SDB_INVALID_TABLE_TYPE TAOS_DEF_ERROR_CODE(0, 0x0335)
|
||||
#define TSDB_CODE_SDB_INVALID_KEY_TYPE TAOS_DEF_ERROR_CODE(0, 0x0336)
|
||||
#define TSDB_CODE_SDB_INVALID_ACTION_TYPE TAOS_DEF_ERROR_CODE(0, 0x0337)
|
||||
#define TSDB_CODE_SDB_INVALID_STATUS_TYPE TAOS_DEF_ERROR_CODE(0, 0x0338)
|
||||
#define TSDB_CODE_SDB_INVALID_DATA_VER TAOS_DEF_ERROR_CODE(0, 0x0339)
|
||||
#define TSDB_CODE_SDB_INVALID_DATA_LEN TAOS_DEF_ERROR_CODE(0, 0x033A)
|
||||
#define TSDB_CODE_SDB_INVALID_DATA_CONTENT TAOS_DEF_ERROR_CODE(0, 0x033B)
|
||||
|
||||
// mnode-dnode
|
||||
#define TSDB_CODE_MND_DNODE_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0330)
|
||||
#define TSDB_CODE_MND_DNODE_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0331)
|
||||
#define TSDB_CODE_MND_NO_ENOUGH_DNODES TAOS_DEF_ERROR_CODE(0, 0x0332)
|
||||
#define TSDB_CODE_MND_INVALID_CLUSTER_CFG TAOS_DEF_ERROR_CODE(0, 0x0333)
|
||||
#define TSDB_CODE_MND_INVALID_CLUSTER_ID TAOS_DEF_ERROR_CODE(0, 0x0334)
|
||||
#define TSDB_CODE_MND_INVALID_DNODE_CFG TAOS_DEF_ERROR_CODE(0, 0x0335)
|
||||
#define TSDB_CODE_MND_INVALID_DNODE_EP TAOS_DEF_ERROR_CODE(0, 0x0336)
|
||||
#define TSDB_CODE_MND_INVALID_DNODE_ID TAOS_DEF_ERROR_CODE(0, 0x0337)
|
||||
#define TSDB_CODE_MND_DNODE_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0340)
|
||||
#define TSDB_CODE_MND_DNODE_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0341)
|
||||
#define TSDB_CODE_MND_TOO_MANY_DNODES TAOS_DEF_ERROR_CODE(0, 0x0342)
|
||||
#define TSDB_CODE_MND_NO_ENOUGH_DNODES TAOS_DEF_ERROR_CODE(0, 0x0343)
|
||||
#define TSDB_CODE_MND_INVALID_CLUSTER_CFG TAOS_DEF_ERROR_CODE(0, 0x0344)
|
||||
#define TSDB_CODE_MND_INVALID_CLUSTER_ID TAOS_DEF_ERROR_CODE(0, 0x0345)
|
||||
#define TSDB_CODE_MND_INVALID_DNODE_CFG TAOS_DEF_ERROR_CODE(0, 0x0346)
|
||||
#define TSDB_CODE_MND_INVALID_DNODE_EP TAOS_DEF_ERROR_CODE(0, 0x0347)
|
||||
#define TSDB_CODE_MND_INVALID_DNODE_ID TAOS_DEF_ERROR_CODE(0, 0x0348)
|
||||
|
||||
// mnode-vgroup
|
||||
#define TSDB_CODE_MND_VGROUP_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0332) //"VGroup does not exist")
|
||||
#define TSDB_CODE_MND_VGROUP_NOT_IN_DNODE TAOS_DEF_ERROR_CODE(0, 0x0338) //"Vgroup not in dnode")
|
||||
#define TSDB_CODE_MND_VGROUP_ALREADY_IN_DNODE TAOS_DEF_ERROR_CODE(0, 0x0339) //"Vgroup already in dnode")
|
||||
#define TSDB_CODE_MND_NOT_READY TAOS_DEF_ERROR_CODE(0, 0x033C) //"Cluster not ready")
|
||||
// mnode-mnode
|
||||
#define TSDB_CODE_MND_MNODE_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0350)
|
||||
#define TSDB_CODE_MND_MNODE_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0351)
|
||||
#define TSDB_CODE_MND_TOO_MANY_MNODES TAOS_DEF_ERROR_CODE(0, 0x0352)
|
||||
|
||||
// mnode-acct
|
||||
#define TSDB_CODE_MND_ACCT_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0340) //"Account already exists")
|
||||
#define TSDB_CODE_MND_ACCT_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0341) //"Invalid account")
|
||||
#define TSDB_CODE_MND_INVALID_ACCT_OPTION TAOS_DEF_ERROR_CODE(0, 0x0342) //"Invalid account options")
|
||||
#define TSDB_CODE_MND_ACCT_EXPIRED TAOS_DEF_ERROR_CODE(0, 0x0343) //"Account authorization has expired")
|
||||
#define TSDB_CODE_MND_ACCT_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0360)
|
||||
#define TSDB_CODE_MND_ACCT_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0361)
|
||||
#define TSDB_CODE_MND_TOO_MANY_ACCTS TAOS_DEF_ERROR_CODE(0, 0x0362)
|
||||
#define TSDB_CODE_MND_INVALID_ACCT_OPTION TAOS_DEF_ERROR_CODE(0, 0x0363)
|
||||
#define TSDB_CODE_MND_ACCT_EXPIRED TAOS_DEF_ERROR_CODE(0, 0x0364)
|
||||
|
||||
#define TSDB_CODE_MND_USER_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0350) //"User already exists")
|
||||
#define TSDB_CODE_MND_USER_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0351) //"Invalid user")
|
||||
#define TSDB_CODE_MND_INVALID_USER_FORMAT TAOS_DEF_ERROR_CODE(0, 0x0352) //"Invalid user format")
|
||||
#define TSDB_CODE_MND_INVALID_PASS_FORMAT TAOS_DEF_ERROR_CODE(0, 0x0353) //"Invalid password format")
|
||||
#define TSDB_CODE_MND_NO_USER_FROM_CONN TAOS_DEF_ERROR_CODE(0, 0x0354) //"Can not get user from conn")
|
||||
#define TSDB_CODE_MND_TOO_MANY_USERS TAOS_DEF_ERROR_CODE(0, 0x0355) //"Too many users")
|
||||
// mnode-user
|
||||
#define TSDB_CODE_MND_USER_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0370)
|
||||
#define TSDB_CODE_MND_USER_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0371)
|
||||
#define TSDB_CODE_MND_TOO_MANY_USERS TAOS_DEF_ERROR_CODE(0, 0x0372)
|
||||
#define TSDB_CODE_MND_INVALID_USER_FORMAT TAOS_DEF_ERROR_CODE(0, 0x0373)
|
||||
#define TSDB_CODE_MND_INVALID_PASS_FORMAT TAOS_DEF_ERROR_CODE(0, 0x0374)
|
||||
#define TSDB_CODE_MND_NO_USER_FROM_CONN TAOS_DEF_ERROR_CODE(0, 0x0375)
|
||||
|
||||
#define TSDB_CODE_MND_MNODE_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0348) //"Mnode already exists")
|
||||
#define TSDB_CODE_MND_MNODE_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0349) //"Mnode not there")
|
||||
// mnode-db
|
||||
#define TSDB_CODE_MND_DB_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0380)
|
||||
#define TSDB_CODE_MND_DB_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0381)
|
||||
#define TSDB_CODE_MND_TOO_MANY_DATABASES TAOS_DEF_ERROR_CODE(0, 0x0382)
|
||||
#define TSDB_CODE_MND_DB_NOT_SELECTED TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB TAOS_DEF_ERROR_CODE(0, 0x0384)
|
||||
#define TSDB_CODE_MND_INVALID_DB_OPTION TAOS_DEF_ERROR_CODE(0, 0x0385)
|
||||
#define TSDB_CODE_MND_INVALID_DB_ACCT TAOS_DEF_ERROR_CODE(0, 0x0386)
|
||||
#define TSDB_CODE_MND_DB_OPTION_UNCHANGED TAOS_DEF_ERROR_CODE(0, 0x0387)
|
||||
|
||||
// mnode-vgroup
|
||||
#define TSDB_CODE_MND_VGROUP_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0390)
|
||||
#define TSDB_CODE_MND_VGROUP_NOT_IN_DNODE TAOS_DEF_ERROR_CODE(0, 0x0391)
|
||||
#define TSDB_CODE_MND_VGROUP_ALREADY_IN_DNODE TAOS_DEF_ERROR_CODE(0, 0x0392)
|
||||
|
||||
// mnode-stable
|
||||
#define TSDB_CODE_MND_STB_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0360)
|
||||
|
@ -224,30 +244,6 @@ int32_t* taosGetErrno();
|
|||
#define TSDB_CODE_MND_INVALID_TAG_LENGTH TAOS_DEF_ERROR_CODE(0, 0x0376) //"invalid tag length")
|
||||
#define TSDB_CODE_MND_INVALID_COLUMN_LENGTH TAOS_DEF_ERROR_CODE(0, 0x0377) //"invalid column length")
|
||||
|
||||
#define TSDB_CODE_MND_DB_NOT_SELECTED TAOS_DEF_ERROR_CODE(0, 0x0380)
|
||||
#define TSDB_CODE_MND_DB_NOT_EXIST TAOS_DEF_ERROR_CODE(0, 0x0381)
|
||||
#define TSDB_CODE_MND_DB_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x0381)
|
||||
#define TSDB_CODE_MND_INVALID_DB TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_OPTION TAOS_DEF_ERROR_CODE(0, 0x0382)
|
||||
#define TSDB_CODE_MND_INVALID_DB_CACHE_SIZE TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_TOTAL_BLOCKS TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_DAYS TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_KEEP0 TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_KEEP1 TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_KEEP2 TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_MIN_ROWS TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_MAX_ROWS TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_COMMIT_TIME TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_FSYNC_PERIOD TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_WAL_LEVEL TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_PRECISION TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_COMP TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_REPLICA TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_QUORUM TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_UPDATE TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_INVALID_DB_CACHE_LAST TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_DB_OPTION_UNCHANGED TAOS_DEF_ERROR_CODE(0, 0x0383)
|
||||
#define TSDB_CODE_MND_TOO_MANY_DATABASES TAOS_DEF_ERROR_CODE(0, 0x0385) //"Too many databases for account")
|
||||
|
||||
// dnode
|
||||
#define TSDB_CODE_DND_ACTION_IN_PROGRESS TAOS_DEF_ERROR_CODE(0, 0x0400)
|
||||
|
|
|
@ -25,7 +25,9 @@ extern "C" {
|
|||
#define TSDB__packed
|
||||
|
||||
#define TSKEY int64_t
|
||||
#define TSKEY_INITIAL_VAL INT64_MIN
|
||||
#define TSKEY_MIN INT64_MIN
|
||||
#define TSKEY_MAX (INT64_MAX - 1)
|
||||
#define TSKEY_INITIAL_VAL TSKEY_MIN
|
||||
|
||||
// Bytes for each type.
|
||||
extern const int32_t TYPE_BYTES[15];
|
||||
|
@ -209,6 +211,7 @@ do { \
|
|||
#define TSDB_STEP_NAME_LEN 32
|
||||
#define TSDB_STEP_DESC_LEN 128
|
||||
|
||||
#define TSDB_ERROR_MSG_LEN 1024
|
||||
#define TSDB_DNODE_CONFIG_LEN 128
|
||||
|
||||
#define TSDB_MQTT_HOSTNAME_LEN 64
|
||||
|
|
|
@ -32,7 +32,6 @@ extern int32_t mDebugFlag;
|
|||
extern int32_t cDebugFlag;
|
||||
extern int32_t jniDebugFlag;
|
||||
extern int32_t tmrDebugFlag;
|
||||
extern int32_t sdbDebugFlag;
|
||||
extern int32_t httpDebugFlag;
|
||||
extern int32_t mqttDebugFlag;
|
||||
extern int32_t monDebugFlag;
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern bool tIsValidSchema(struct SSchema* pSchema, int32_t numOfCols, int32_t numOfTags);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -30,19 +30,12 @@
|
|||
// cluster
|
||||
char tsFirst[TSDB_EP_LEN] = {0};
|
||||
char tsSecond[TSDB_EP_LEN] = {0};
|
||||
char tsArbitrator[TSDB_EP_LEN] = {0};
|
||||
char tsLocalFqdn[TSDB_FQDN_LEN] = {0};
|
||||
char tsLocalEp[TSDB_EP_LEN] = {0}; // Local End Point, hostname:port
|
||||
uint16_t tsServerPort = 6030;
|
||||
int32_t tsStatusInterval = 1; // second
|
||||
int32_t tsNumOfMnodes = 1;
|
||||
int8_t tsEnableVnodeBak = 1;
|
||||
int8_t tsEnableTelemetryReporting = 0;
|
||||
int8_t tsArbOnline = 0;
|
||||
int64_t tsArbOnlineTimestamp = TSDB_ARB_DUMMY_TIME;
|
||||
char tsEmail[TSDB_FQDN_LEN] = {0};
|
||||
int32_t tsDnodeId = 0;
|
||||
int64_t tsDnodeStartTime = 0;
|
||||
|
||||
// common
|
||||
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
|
||||
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
|
||||
// For backward compatibility
|
||||
bool tsdbForceKeepFile = false;
|
||||
|
||||
// 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 tsEnableSlaveQuery = 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
|
||||
int8_t tsEnableMonitorModule = 1;
|
||||
char tsMonitorDbName[TSDB_DB_NAME_LEN] = "log";
|
||||
char tsInternalPass[] = "secretkey";
|
||||
int32_t tsMonitorInterval = 30; // seconds
|
||||
|
||||
// stream
|
||||
int8_t tsEnableStream = 1;
|
||||
|
||||
// internal
|
||||
int8_t tsCompactMnodeWal = 0;
|
||||
|
@ -191,7 +144,6 @@ char tsDnodeDir[PATH_MAX] = {0};
|
|||
char tsMnodeDir[PATH_MAX] = {0};
|
||||
|
||||
int32_t tsDiskCfgNum = 0;
|
||||
int32_t tsTopicBianryLen = 16000;
|
||||
|
||||
#ifndef _STORAGE
|
||||
SDiskCfg tsDiskCfg[1];
|
||||
|
@ -245,14 +197,10 @@ static pthread_once_t tsInitGlobalCfgOnce = PTHREAD_ONCE_INIT;
|
|||
void taosSetAllDebugFlag() {
|
||||
if (debugFlag != 0) {
|
||||
mDebugFlag = debugFlag;
|
||||
sdbDebugFlag = debugFlag;
|
||||
dDebugFlag = debugFlag;
|
||||
vDebugFlag = debugFlag;
|
||||
jniDebugFlag = debugFlag;
|
||||
odbcDebugFlag = debugFlag;
|
||||
httpDebugFlag = debugFlag;
|
||||
mqttDebugFlag = debugFlag;
|
||||
monDebugFlag = debugFlag;
|
||||
qDebugFlag = debugFlag;
|
||||
rpcDebugFlag = debugFlag;
|
||||
uDebugFlag = debugFlag;
|
||||
|
@ -459,16 +407,6 @@ static void doInitGlobalConfig(void) {
|
|||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||
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
|
||||
cfg.option = "numOfThreadsPerCore";
|
||||
cfg.ptr = &tsNumOfThreadsPerCore;
|
||||
|
@ -509,26 +447,6 @@ static void doInitGlobalConfig(void) {
|
|||
cfg.ptrLength = 0;
|
||||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||
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.ptr = &tsEnableTelemetryReporting;
|
||||
|
@ -540,37 +458,6 @@ static void doInitGlobalConfig(void) {
|
|||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||
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
|
||||
cfg.option = "maxTmrCtrl";
|
||||
cfg.ptr = &tsMaxTmrCtrl;
|
||||
|
@ -582,26 +469,6 @@ static void doInitGlobalConfig(void) {
|
|||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||
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.ptr = &tsRpcTimer;
|
||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
||||
|
@ -712,186 +579,6 @@ static void doInitGlobalConfig(void) {
|
|||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||
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.ptr = &tsCompressMsgSize;
|
||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
||||
|
@ -1085,76 +772,6 @@ static void doInitGlobalConfig(void) {
|
|||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||
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
|
||||
cfg.option = "numOfLogLines";
|
||||
cfg.ptr = &tsNumOfLogLines;
|
||||
|
@ -1236,17 +853,6 @@ static void doInitGlobalConfig(void) {
|
|||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||
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.ptr = &rpcDebugFlag;
|
||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
||||
|
@ -1307,36 +913,6 @@ static void doInitGlobalConfig(void) {
|
|||
cfg.unitType = TAOS_CFG_UTYPE_NONE;
|
||||
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.ptr = &qDebugFlag;
|
||||
cfg.valType = TAOS_CFG_VTYPE_INT32;
|
||||
|
@ -1456,16 +1032,6 @@ static void doInitGlobalConfig(void) {
|
|||
cfg.maxValue = 0;
|
||||
cfg.ptrLength = PATH_MAX;
|
||||
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);
|
||||
|
||||
// enable kill long query
|
||||
|
@ -1630,4 +1196,3 @@ bool taosCheckBalanceCfgOptions(const char *option, int32_t *vnodeId, int32_t *d
|
|||
|
||||
return true;
|
||||
}
|
||||
|