Add version control and persist.
This commit is contained in:
parent
6b744211ff
commit
f46037870d
|
@ -118,6 +118,8 @@ void cfgCleanup(SConfig *pCfg);
|
||||||
int32_t cfgGetSize(SConfig *pCfg);
|
int32_t cfgGetSize(SConfig *pCfg);
|
||||||
SConfigItem *cfgGetItem(SConfig *pCfg, const char *pName);
|
SConfigItem *cfgGetItem(SConfig *pCfg, const char *pName);
|
||||||
int32_t cfgSetItem(SConfig *pCfg, const char *name, const char *value, ECfgSrcType stype, bool lock);
|
int32_t cfgSetItem(SConfig *pCfg, const char *name, const char *value, ECfgSrcType stype, bool lock);
|
||||||
|
int32_t cfgGetAndSetItem(SConfig *pCfg, SConfigItem *pItem, const char *name, const char *value, ECfgSrcType stype,
|
||||||
|
bool lock);
|
||||||
int32_t cfgCheckRangeForDynUpdate(SConfig *pCfg, const char *name, const char *pVal, bool isServer);
|
int32_t cfgCheckRangeForDynUpdate(SConfig *pCfg, const char *name, const char *pVal, bool isServer);
|
||||||
|
|
||||||
int32_t cfgCreateIter(SConfig *pConf, SConfigIter **ppIter);
|
int32_t cfgCreateIter(SConfig *pConf, SConfigIter **ppIter);
|
||||||
|
@ -148,11 +150,11 @@ void cfgDumpCfg(SConfig *pCfg, bool tsc, bool dump);
|
||||||
void cfgDumpCfgS3(SConfig *pCfg, bool tsc, bool dump);
|
void cfgDumpCfgS3(SConfig *pCfg, bool tsc, bool dump);
|
||||||
|
|
||||||
int32_t cfgGetApollUrl(const char **envCmd, const char *envFile, char *apolloUrl);
|
int32_t cfgGetApollUrl(const char **envCmd, const char *envFile, char *apolloUrl);
|
||||||
SArray *getLocalCfg(SConfig *pCfg);
|
SArray *taosGetLocalCfg(SConfig *pCfg);
|
||||||
SArray *getGlobalCfg(SConfig *pCfg);
|
SArray *taosGetGlobalCfg(SConfig *pCfg);
|
||||||
|
|
||||||
void setLocalCfg(SConfig *pCfg, SArray *pArray);
|
void taosSetLocalCfg(SConfig *pCfg, SArray *pArray);
|
||||||
void setGlobalCfg(SConfig *pCfg, SArray *pArray);
|
void taosSetGlobalCfg(SConfig *pCfg, SArray *pArray);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1969,10 +1969,10 @@ int32_t readCfgFile(const char *path, bool isGlobal) {
|
||||||
char filename[CONFIG_FILE_LEN] = {0};
|
char filename[CONFIG_FILE_LEN] = {0};
|
||||||
SArray *array = NULL;
|
SArray *array = NULL;
|
||||||
if (isGlobal) {
|
if (isGlobal) {
|
||||||
array = getGlobalCfg(tsCfg);
|
array = taosGetGlobalCfg(tsCfg);
|
||||||
snprintf(filename, sizeof(filename), "%s%sconfig%sglobal.json", path, TD_DIRSEP, TD_DIRSEP);
|
snprintf(filename, sizeof(filename), "%s%sconfig%sglobal.json", path, TD_DIRSEP, TD_DIRSEP);
|
||||||
} else {
|
} else {
|
||||||
array = getLocalCfg(tsCfg);
|
array = taosGetLocalCfg(tsCfg);
|
||||||
snprintf(filename, sizeof(filename), "%s%sconfig%slocal.json", path, TD_DIRSEP, TD_DIRSEP);
|
snprintf(filename, sizeof(filename), "%s%sconfig%slocal.json", path, TD_DIRSEP, TD_DIRSEP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2802,7 +2802,7 @@ int32_t persistLocalConfig(const char *path) {
|
||||||
TAOS_RETURN(code);
|
TAOS_RETURN(code);
|
||||||
}
|
}
|
||||||
char *serialized = NULL;
|
char *serialized = NULL;
|
||||||
code = localConfigSerialize(getLocalCfg(tsCfg), &serialized);
|
code = localConfigSerialize(taosGetLocalCfg(tsCfg), &serialized);
|
||||||
if (code != TSDB_CODE_SUCCESS) {
|
if (code != TSDB_CODE_SUCCESS) {
|
||||||
uError("failed to serialize local config since %s", tstrerror(code));
|
uError("failed to serialize local config since %s", tstrerror(code));
|
||||||
TAOS_RETURN(code);
|
TAOS_RETURN(code);
|
||||||
|
|
|
@ -3243,6 +3243,7 @@ int32_t tSerializeSDCfgDnodeReq(void *buf, int32_t bufLen, SDCfgDnodeReq *pReq)
|
||||||
tEncoderInit(&encoder, buf, bufLen);
|
tEncoderInit(&encoder, buf, bufLen);
|
||||||
|
|
||||||
TAOS_CHECK_EXIT(tStartEncode(&encoder));
|
TAOS_CHECK_EXIT(tStartEncode(&encoder));
|
||||||
|
TAOS_CHECK_EXIT(tEncodeI32(&encoder, pReq->version));
|
||||||
TAOS_CHECK_EXIT(tEncodeCStr(&encoder, pReq->config));
|
TAOS_CHECK_EXIT(tEncodeCStr(&encoder, pReq->config));
|
||||||
TAOS_CHECK_EXIT(tEncodeCStr(&encoder, pReq->value));
|
TAOS_CHECK_EXIT(tEncodeCStr(&encoder, pReq->value));
|
||||||
tEndEncode(&encoder);
|
tEndEncode(&encoder);
|
||||||
|
@ -3264,6 +3265,7 @@ int32_t tDeserializeSDCfgDnodeReq(void *buf, int32_t bufLen, SDCfgDnodeReq *pReq
|
||||||
tDecoderInit(&decoder, buf, bufLen);
|
tDecoderInit(&decoder, buf, bufLen);
|
||||||
|
|
||||||
TAOS_CHECK_EXIT(tStartDecode(&decoder));
|
TAOS_CHECK_EXIT(tStartDecode(&decoder));
|
||||||
|
TAOS_CHECK_EXIT(tDecodeI32(&decoder, &pReq->version));
|
||||||
TAOS_CHECK_EXIT(tDecodeCStrTo(&decoder, pReq->config));
|
TAOS_CHECK_EXIT(tDecodeCStrTo(&decoder, pReq->config));
|
||||||
TAOS_CHECK_EXIT(tDecodeCStrTo(&decoder, pReq->value));
|
TAOS_CHECK_EXIT(tDecodeCStrTo(&decoder, pReq->value));
|
||||||
tEndDecode(&decoder);
|
tEndDecode(&decoder);
|
||||||
|
|
|
@ -304,7 +304,7 @@ static void dmProcessConfigRsp(SDnodeMgmt *pMgmt, SRpcMsg *pRsp) {
|
||||||
tDeserializeSConfigRsp(pRsp->pCont, pRsp->contLen, &configRsp) == 0) {
|
tDeserializeSConfigRsp(pRsp->pCont, pRsp->contLen, &configRsp) == 0) {
|
||||||
if (configRsp.forceReadConfig) {
|
if (configRsp.forceReadConfig) {
|
||||||
if (configRsp.isConifgVerified) {
|
if (configRsp.isConifgVerified) {
|
||||||
persistGlobalConfig(getGlobalCfg(tsCfg), pMgmt->path, configRsp.cver);
|
persistGlobalConfig(taosGetGlobalCfg(tsCfg), pMgmt->path, configRsp.cver);
|
||||||
} else {
|
} else {
|
||||||
// log the difference configurations
|
// log the difference configurations
|
||||||
printConfigNotMatch(configRsp.array);
|
printConfigNotMatch(configRsp.array);
|
||||||
|
@ -330,7 +330,7 @@ void dmSendConfigReq(SDnodeMgmt *pMgmt) {
|
||||||
|
|
||||||
req.cver = tsdmConfigVersion;
|
req.cver = tsdmConfigVersion;
|
||||||
req.forceReadConfig = tsForceReadConfig;
|
req.forceReadConfig = tsForceReadConfig;
|
||||||
req.array = getGlobalCfg(tsCfg);
|
req.array = taosGetGlobalCfg(tsCfg);
|
||||||
dDebug("send config req to mnode, configVersion:%d", req.cver);
|
dDebug("send config req to mnode, configVersion:%d", req.cver);
|
||||||
|
|
||||||
int32_t contLen = tSerializeSConfigReq(NULL, 0, &req);
|
int32_t contLen = tSerializeSConfigReq(NULL, 0, &req);
|
||||||
|
@ -446,9 +446,9 @@ int32_t dmProcessConfigReq(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) {
|
||||||
|
|
||||||
dInfo("start to config, option:%s, value:%s", cfgReq.config, cfgReq.value);
|
dInfo("start to config, option:%s, value:%s", cfgReq.config, cfgReq.value);
|
||||||
|
|
||||||
SConfig *pCfg = taosGetCfg();
|
SConfig *pCfg = taosGetCfg();
|
||||||
|
SConfigItem *pItem = NULL;
|
||||||
code = cfgSetItem(pCfg, cfgReq.config, cfgReq.value, CFG_STYPE_ALTER_CMD, true);
|
code = cfgGetAndSetItem(pCfg, pItem, cfgReq.config, cfgReq.value, CFG_STYPE_ALTER_CMD, true);
|
||||||
if (code != 0) {
|
if (code != 0) {
|
||||||
if (strncasecmp(cfgReq.config, "resetlog", strlen("resetlog")) == 0) {
|
if (strncasecmp(cfgReq.config, "resetlog", strlen("resetlog")) == 0) {
|
||||||
code = 0;
|
code = 0;
|
||||||
|
@ -456,8 +456,17 @@ int32_t dmProcessConfigReq(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) {
|
||||||
return code;
|
return code;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
TAOS_CHECK_RETURN(taosCfgDynamicOptions(pCfg, cfgReq.config, true));
|
||||||
|
if (cfgReq.version > 0) {
|
||||||
|
tsdmConfigVersion = cfgReq.version;
|
||||||
|
}
|
||||||
|
if (pItem->category == CFG_CATEGORY_GLOBAL) {
|
||||||
|
persistGlobalConfig(taosGetGlobalCfg(pCfg), pMgmt->path, tsdmConfigVersion);
|
||||||
|
} else {
|
||||||
|
persistLocalConfig(pMgmt->path);
|
||||||
|
}
|
||||||
|
|
||||||
return taosCfgDynamicOptions(pCfg, cfgReq.config, true);
|
return TSDB_CODE_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t dmProcessCreateEncryptKeyReq(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) {
|
int32_t dmProcessCreateEncryptKeyReq(SDnodeMgmt *pMgmt, SRpcMsg *pMsg) {
|
||||||
|
|
|
@ -214,18 +214,18 @@ static int32_t mndProcessConfigReq(SRpcMsg *pReq) {
|
||||||
configRsp.cver = tsmmConfigVersion;
|
configRsp.cver = tsmmConfigVersion;
|
||||||
if (configRsp.forceReadConfig) {
|
if (configRsp.forceReadConfig) {
|
||||||
// compare config array from configReq with current config array
|
// compare config array from configReq with current config array
|
||||||
if (compareSConfigItemArrays(getGlobalCfg(tsCfg), configReq.array, diffArray)) {
|
if (compareSConfigItemArrays(taosGetGlobalCfg(tsCfg), configReq.array, diffArray)) {
|
||||||
configRsp.array = diffArray;
|
configRsp.array = diffArray;
|
||||||
} else {
|
} else {
|
||||||
configRsp.isConifgVerified = 1;
|
configRsp.isConifgVerified = 1;
|
||||||
taosArrayDestroy(diffArray);
|
taosArrayDestroy(diffArray);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
configRsp.array = getGlobalCfg(tsCfg);
|
configRsp.array = taosGetGlobalCfg(tsCfg);
|
||||||
if (configReq.cver == tsmmConfigVersion) {
|
if (configReq.cver == tsmmConfigVersion) {
|
||||||
configRsp.isVersionVerified = 1;
|
configRsp.isVersionVerified = 1;
|
||||||
} else {
|
} else {
|
||||||
configRsp.array = getGlobalCfg(tsCfg);
|
configRsp.array = taosGetGlobalCfg(tsCfg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -261,10 +261,10 @@ int32_t mndInitWriteCfg(SMnode *pMnode) {
|
||||||
if ((code = mndSetCreateConfigCommitLogs(pTrans, &obj)) != 0) {
|
if ((code = mndSetCreateConfigCommitLogs(pTrans, &obj)) != 0) {
|
||||||
mError("failed to init mnd config version, since %s", terrstr());
|
mError("failed to init mnd config version, since %s", terrstr());
|
||||||
}
|
}
|
||||||
sz = taosArrayGetSize(getGlobalCfg(tsCfg));
|
sz = taosArrayGetSize(taosGetGlobalCfg(tsCfg));
|
||||||
|
|
||||||
for (int i = 0; i < sz; ++i) {
|
for (int i = 0; i < sz; ++i) {
|
||||||
SConfigItem *item = taosArrayGet(getGlobalCfg(tsCfg), i);
|
SConfigItem *item = taosArrayGet(taosGetGlobalCfg(tsCfg), i);
|
||||||
SConfigObj *obj = mndInitConfigObj(item);
|
SConfigObj *obj = mndInitConfigObj(item);
|
||||||
if ((code = mndSetCreateConfigCommitLogs(pTrans, obj)) != 0) {
|
if ((code = mndSetCreateConfigCommitLogs(pTrans, obj)) != 0) {
|
||||||
mError("failed to init mnd config:%s, since %s", item->name, terrstr());
|
mError("failed to init mnd config:%s, since %s", item->name, terrstr());
|
||||||
|
@ -296,9 +296,9 @@ int32_t mndInitReadCfg(SMnode *pMnode) {
|
||||||
sdbRelease(pMnode->pSdb, obj);
|
sdbRelease(pMnode->pSdb, obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
sz = taosArrayGetSize(getGlobalCfg(tsCfg));
|
sz = taosArrayGetSize(taosGetGlobalCfg(tsCfg));
|
||||||
for (int i = 0; i < sz; ++i) {
|
for (int i = 0; i < sz; ++i) {
|
||||||
SConfigItem *item = taosArrayGet(getGlobalCfg(tsCfg), i);
|
SConfigItem *item = taosArrayGet(taosGetGlobalCfg(tsCfg), i);
|
||||||
SConfigObj *newObj = sdbAcquire(pMnode->pSdb, SDB_CFG, item->name);
|
SConfigObj *newObj = sdbAcquire(pMnode->pSdb, SDB_CFG, item->name);
|
||||||
if (newObj == NULL) {
|
if (newObj == NULL) {
|
||||||
mInfo("failed to acquire mnd config:%s, since %s", item->name, terrstr());
|
mInfo("failed to acquire mnd config:%s, since %s", item->name, terrstr());
|
||||||
|
@ -481,7 +481,8 @@ static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) {
|
||||||
|
|
||||||
TAOS_CHECK_GOTO(cfgCheckRangeForDynUpdate(taosGetCfg(), dcfgReq.config, dcfgReq.value, true), &lino, _err_out);
|
TAOS_CHECK_GOTO(cfgCheckRangeForDynUpdate(taosGetCfg(), dcfgReq.config, dcfgReq.value, true), &lino, _err_out);
|
||||||
}
|
}
|
||||||
mndConfigUpdateTrans(pMnode, cfgReq.config, cfgReq.value);
|
// update config in sdb
|
||||||
|
TAOS_CHECK_GOTO(mndConfigUpdateTrans(pMnode, cfgReq.config, cfgReq.value), &lino, _err_out);
|
||||||
{ // audit
|
{ // audit
|
||||||
char obj[50] = {0};
|
char obj[50] = {0};
|
||||||
(void)sprintf(obj, "%d", cfgReq.dnodeId);
|
(void)sprintf(obj, "%d", cfgReq.dnodeId);
|
||||||
|
@ -491,6 +492,7 @@ static int32_t mndProcessConfigDnodeReq(SRpcMsg *pReq) {
|
||||||
|
|
||||||
tFreeSMCfgDnodeReq(&cfgReq);
|
tFreeSMCfgDnodeReq(&cfgReq);
|
||||||
|
|
||||||
|
dcfgReq.version = tsmmConfigVersion;
|
||||||
code = mndSendCfgDnodeReq(pMnode, cfgReq.dnodeId, &dcfgReq);
|
code = mndSendCfgDnodeReq(pMnode, cfgReq.dnodeId, &dcfgReq);
|
||||||
|
|
||||||
// dont care suss or succ;
|
// dont care suss or succ;
|
||||||
|
|
|
@ -40,6 +40,7 @@ int32_t cfgLoadFromEnvFile(SConfig *pConfig, const char *envFile);
|
||||||
int32_t cfgLoadFromEnvVar(SConfig *pConfig);
|
int32_t cfgLoadFromEnvVar(SConfig *pConfig);
|
||||||
int32_t cfgLoadFromEnvCmd(SConfig *pConfig, const char **envCmd);
|
int32_t cfgLoadFromEnvCmd(SConfig *pConfig, const char **envCmd);
|
||||||
int32_t cfgLoadFromApollUrl(SConfig *pConfig, const char *url);
|
int32_t cfgLoadFromApollUrl(SConfig *pConfig, const char *url);
|
||||||
|
int32_t cfgSetItemVal(SConfigItem *item, ECfgDataType dtype);
|
||||||
|
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
|
||||||
|
@ -353,49 +354,7 @@ int32_t cfgSetItem(SConfig *pCfg, const char *name, const char *value, ECfgSrcTy
|
||||||
TAOS_RETURN(TSDB_CODE_CFG_NOT_FOUND);
|
TAOS_RETURN(TSDB_CODE_CFG_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (pItem->dtype) {
|
TAOS_CHECK_RETURN(cfgSetItemVal(pItem, pItem->dtype));
|
||||||
case CFG_DTYPE_BOOL: {
|
|
||||||
code = cfgSetBool(pItem, value, stype);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case CFG_DTYPE_INT32: {
|
|
||||||
code = cfgSetInt32(pItem, value, stype);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case CFG_DTYPE_INT64: {
|
|
||||||
code = cfgSetInt64(pItem, value, stype);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case CFG_DTYPE_FLOAT:
|
|
||||||
case CFG_DTYPE_DOUBLE: {
|
|
||||||
code = cfgSetFloat(pItem, value, stype);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case CFG_DTYPE_STRING: {
|
|
||||||
code = cfgSetString(pItem, value, stype);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case CFG_DTYPE_DIR: {
|
|
||||||
code = cfgSetDir(pItem, value, stype);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case CFG_DTYPE_TIMEZONE: {
|
|
||||||
code = cfgSetTimezone(pItem, value, stype);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case CFG_DTYPE_CHARSET: {
|
|
||||||
code = doSetConf(pItem, value, stype);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case CFG_DTYPE_LOCALE: {
|
|
||||||
code = doSetConf(pItem, value, stype);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case CFG_DTYPE_NONE:
|
|
||||||
default:
|
|
||||||
code = TSDB_CODE_INVALID_CFG;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (lock) {
|
if (lock) {
|
||||||
(void)taosThreadMutexUnlock(&pCfg->lock);
|
(void)taosThreadMutexUnlock(&pCfg->lock);
|
||||||
|
@ -404,6 +363,62 @@ int32_t cfgSetItem(SConfig *pCfg, const char *name, const char *value, ECfgSrcTy
|
||||||
TAOS_RETURN(code);
|
TAOS_RETURN(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int32_t cfgGetAndSetItem(SConfig *pCfg, SConfigItem *pItem, const char *name, const char *value, ECfgSrcType stype,
|
||||||
|
bool lock) {
|
||||||
|
// GRANT_CFG_SET;
|
||||||
|
int32_t code = TSDB_CODE_SUCCESS;
|
||||||
|
|
||||||
|
if (lock) {
|
||||||
|
(void)taosThreadMutexLock(&pCfg->lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
pItem = cfgGetItem(pCfg, name);
|
||||||
|
if (pItem == NULL) {
|
||||||
|
(void)taosThreadMutexUnlock(&pCfg->lock);
|
||||||
|
TAOS_RETURN(TSDB_CODE_CFG_NOT_FOUND);
|
||||||
|
}
|
||||||
|
|
||||||
|
TAOS_CHECK_RETURN(cfgSetItemVal(pItem, pItem->dtype));
|
||||||
|
|
||||||
|
if (lock) {
|
||||||
|
(void)taosThreadMutexUnlock(&pCfg->lock);
|
||||||
|
}
|
||||||
|
|
||||||
|
TAOS_RETURN(code);
|
||||||
|
}
|
||||||
|
|
||||||
|
int32_t cfgSetItemVal(SConfigItem *item, ECfgDataType dtype) {
|
||||||
|
if (item == NULL) {
|
||||||
|
TAOS_RETURN(TSDB_CODE_INVALID_CFG);
|
||||||
|
}
|
||||||
|
item->dtype = dtype;
|
||||||
|
switch (dtype) {
|
||||||
|
case CFG_DTYPE_BOOL:
|
||||||
|
item->bval = false;
|
||||||
|
break;
|
||||||
|
case CFG_DTYPE_INT32:
|
||||||
|
item->i32 = 0;
|
||||||
|
break;
|
||||||
|
case CFG_DTYPE_INT64:
|
||||||
|
item->i64 = 0;
|
||||||
|
break;
|
||||||
|
case CFG_DTYPE_FLOAT:
|
||||||
|
case CFG_DTYPE_DOUBLE:
|
||||||
|
item->fval = 0;
|
||||||
|
break;
|
||||||
|
case CFG_DTYPE_STRING:
|
||||||
|
case CFG_DTYPE_DIR:
|
||||||
|
case CFG_DTYPE_LOCALE:
|
||||||
|
case CFG_DTYPE_CHARSET:
|
||||||
|
case CFG_DTYPE_TIMEZONE:
|
||||||
|
item->str = NULL;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
TAOS_RETURN(TSDB_CODE_INVALID_CFG);
|
||||||
|
}
|
||||||
|
|
||||||
|
TAOS_RETURN(TSDB_CODE_SUCCESS);
|
||||||
|
}
|
||||||
|
|
||||||
SConfigItem *cfgGetItem(SConfig *pCfg, const char *pName) {
|
SConfigItem *cfgGetItem(SConfig *pCfg, const char *pName) {
|
||||||
if (pCfg == NULL) return NULL;
|
if (pCfg == NULL) return NULL;
|
||||||
|
@ -1538,7 +1553,7 @@ void cfgDestroyIter(SConfigIter *pIter) {
|
||||||
taosMemoryFree(pIter);
|
taosMemoryFree(pIter);
|
||||||
}
|
}
|
||||||
|
|
||||||
SArray *getLocalCfg(SConfig *pCfg) { return pCfg->localArray; }
|
SArray *taosGetLocalCfg(SConfig *pCfg) { return pCfg->localArray; }
|
||||||
SArray *getGlobalCfg(SConfig *pCfg) { return pCfg->globalArray; }
|
SArray *taosGetGlobalCfg(SConfig *pCfg) { return pCfg->globalArray; }
|
||||||
void setLocalCfg(SConfig *pCfg, SArray *pArray) { pCfg->localArray = pArray; };
|
void taosSetLocalCfg(SConfig *pCfg, SArray *pArray) { pCfg->localArray = pArray; };
|
||||||
void setGlobalCfg(SConfig *pCfg, SArray *pArray) { pCfg->globalArray = pArray; };
|
void taosSetGlobalCfg(SConfig *pCfg, SArray *pArray) { pCfg->globalArray = pArray; };
|
Loading…
Reference in New Issue