Add config param diskIDCheckEnabled.
This commit is contained in:
parent
7cb2de940a
commit
e68cff0427
|
@ -164,6 +164,7 @@ charset 的有效值是 UTF-8。
|
|||
|参数名称|支持版本|动态修改|参数含义|
|
||||
|--------------------|----------|-------------------------|-|
|
||||
|dataDir | |不支持动态修改 |数据文件目录,所有的数据文件都将写入该目录,默认值 /var/lib/taos|
|
||||
|diskIDCheckEnabled | |不支持动态修改 |在 3.3.4.3 后,在重启 dnode 时增加了检查 dataDir 所在磁盘 id 是否发生改变,0:进行检查,1:不进行检查;默认值:1|
|
||||
|tempDir | |不支持动态修改 |指定所有系统运行过程中的临时文件生成的目录,默认值 /tmp|
|
||||
|minimalDataDirGB | |不支持动态修改 |dataDir 指定的时序数据存储目录所需要保留的最小空间,单位 GB,默认值 2|
|
||||
|minimalTmpDirGB | |不支持动态修改 |tempDir 所指定的临时文件目录所需要保留的最小空间,单位 GB,默认值 1|
|
||||
|
|
|
@ -249,6 +249,7 @@ extern int64_t tsmaDataDeleteMark;
|
|||
extern int64_t tsWalFsyncDataSizeLimit;
|
||||
|
||||
// internal
|
||||
extern bool tsDiskIDCheckEnabled;
|
||||
extern int32_t tsTransPullupInterval;
|
||||
extern int32_t tsCompactPullupInterval;
|
||||
extern int32_t tsMqRebalanceInterval;
|
||||
|
|
|
@ -286,6 +286,7 @@ int32_t tsTtlFlushThreshold = 100; /* maximum number of dirty items in memory.
|
|||
int32_t tsTtlBatchDropNum = 10000; // number of tables dropped per batch
|
||||
|
||||
// internal
|
||||
bool tsDiskIDCheckEnabled = true;
|
||||
int32_t tsTransPullupInterval = 2;
|
||||
int32_t tsCompactPullupInterval = 10;
|
||||
int32_t tsMqRebalanceInterval = 2;
|
||||
|
@ -858,6 +859,7 @@ static int32_t taosAddServerCfg(SConfig *pCfg) {
|
|||
TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "tmqRowSize", tmqRowSize, 1, 1000000, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER,CFG_CATEGORY_GLOBAL));
|
||||
|
||||
TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "maxTsmaNum", tsMaxTsmaNum, 0, 3, CFG_SCOPE_SERVER, CFG_DYN_SERVER,CFG_CATEGORY_GLOBAL));
|
||||
TAOS_CHECK_RETURN(cfgAddBool(pCfg, "diskIDCheckEnabled", tsDiskIDCheckEnabled, CFG_SCOPE_SERVER, CFG_DYN_NONE,CFG_CATEGORY_LOCAL));
|
||||
TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "transPullupInterval", tsTransPullupInterval, 1, 10000, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER,CFG_CATEGORY_GLOBAL));
|
||||
TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "compactPullupInterval", tsCompactPullupInterval, 1, 10000, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER,CFG_CATEGORY_GLOBAL));
|
||||
TAOS_CHECK_RETURN(cfgAddInt32(pCfg, "mqRebalanceInterval", tsMqRebalanceInterval, 1, 10000, CFG_SCOPE_SERVER, CFG_DYN_ENT_SERVER,CFG_CATEGORY_GLOBAL));
|
||||
|
@ -1634,6 +1636,9 @@ static int32_t taosSetServerCfg(SConfig *pCfg) {
|
|||
TAOS_CHECK_GET_CFG_ITEM(pCfg, pItem, "maxTsmaNum");
|
||||
tsMaxTsmaNum = pItem->i32;
|
||||
|
||||
TAOS_CHECK_GET_CFG_ITEM(pCfg, pItem, "diskIDCheckEnabled");
|
||||
tsDiskIDCheckEnabled = pItem->bval;
|
||||
|
||||
TAOS_CHECK_GET_CFG_ITEM(pCfg, pItem, "transPullupInterval");
|
||||
tsTransPullupInterval = pItem->i32;
|
||||
|
||||
|
@ -1969,6 +1974,9 @@ int32_t cfgDeserialize(SArray *array, char *buf, bool isGlobal) {
|
|||
continue;
|
||||
}
|
||||
if (strcasecmp(pItem->name, "dataDir") == 0) {
|
||||
if (!tsDiskIDCheckEnabled) {
|
||||
continue;
|
||||
}
|
||||
int sz = cJSON_GetArraySize(pJson);
|
||||
cJSON *filed = NULL;
|
||||
// check disk id for each dir
|
||||
|
|
Loading…
Reference in New Issue