提交 84b30e07 编写于 作者: S Shengliang Guan

remove global variables

上级 b0453021
...@@ -21,12 +21,6 @@ extern "C" { ...@@ -21,12 +21,6 @@ extern "C" {
#endif #endif
#include "tdef.h" #include "tdef.h"
#include "tcfg.h"
// cluster
extern int32_t tsStatusInterval;
extern int8_t tsEnableTelemetryReporting;
extern int32_t tsNumOfSupportVnodes;
// common // common
extern int tsRpcTimer; extern int tsRpcTimer;
......
...@@ -27,11 +27,6 @@ ...@@ -27,11 +27,6 @@
#include "tutil.h" #include "tutil.h"
#include "ulog.h" #include "ulog.h"
// cluster
int32_t tsStatusInterval = 1; // second
int8_t tsEnableTelemetryReporting = 0;
char tsEmail[TSDB_FQDN_LEN] = {0};
int32_t tsNumOfSupportVnodes = 128;
// common // common
int32_t tsRpcTimer = 300; int32_t tsRpcTimer = 300;
...@@ -125,12 +120,6 @@ int8_t tsDeadLockKillQuery = 0; ...@@ -125,12 +120,6 @@ int8_t tsDeadLockKillQuery = 0;
// For backward compatibility // For backward compatibility
bool tsdbForceKeepFile = false; bool tsdbForceKeepFile = false;
#ifndef _STORAGE
SDiskCfg tsDiskCfg[1];
#else
SDiskCfg tsDiskCfg[TFS_MAX_DISKS];
#endif
/* /*
* minimum scale for whole system, millisecond by default * minimum scale for whole system, millisecond by default
* for TSDB_TIME_PRECISION_MILLI: 86400000L * for TSDB_TIME_PRECISION_MILLI: 86400000L
...@@ -247,12 +236,12 @@ int32_t taosCfgDynamicOptions(char *msg) { ...@@ -247,12 +236,12 @@ int32_t taosCfgDynamicOptions(char *msg) {
return false; return false;
} }
void taosAddDataDir(int index, char *v1, int level, int primary) { // void taosAddDataDir(int index, char *v1, int level, int primary) {
tstrncpy(tsDiskCfg[index].dir, v1, TSDB_FILENAME_LEN); // tstrncpy(tsDiskCfg[index].dir, v1, TSDB_FILENAME_LEN);
tsDiskCfg[index].level = level; // tsDiskCfg[index].level = level;
tsDiskCfg[index].primary = primary; // tsDiskCfg[index].primary = primary;
uTrace("dataDir:%s, level:%d primary:%d is configured", v1, level, primary); // uTrace("dataDir:%s, level:%d primary:%d is configured", v1, level, primary);
} // }
#ifndef _STORAGE #ifndef _STORAGE
// void taosReadDataDirCfg(char *v1, char *v2, char *v3) { // void taosReadDataDirCfg(char *v1, char *v2, char *v3) {
...@@ -302,16 +291,6 @@ static void doInitGlobalConfig(void) { ...@@ -302,16 +291,6 @@ static void doInitGlobalConfig(void) {
cfg.unitType = TAOS_CFG_UTYPE_NONE; cfg.unitType = TAOS_CFG_UTYPE_NONE;
taosAddConfigOption(cfg); taosAddConfigOption(cfg);
cfg.option = "telemetryReporting";
cfg.ptr = &tsEnableTelemetryReporting;
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);
// timer // timer
cfg.option = "maxTmrCtrl"; cfg.option = "maxTmrCtrl";
cfg.ptr = &tsMaxTmrCtrl; cfg.ptr = &tsMaxTmrCtrl;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册