[TD-926] add blance para while check parameters
This commit is contained in:
parent
cd12407cd7
commit
4282dc41eb
|
@ -723,6 +723,7 @@ static void dnodeSendStatusMsg(void *handle, void *tmrId) {
|
|||
|
||||
// fill cluster cfg parameters
|
||||
pStatus->clusterCfg.numOfMnodes = htonl(tsNumOfMnodes);
|
||||
pStatus->clusterCfg.enableBalance = htonl(tsEnableBalance);
|
||||
pStatus->clusterCfg.mnodeEqualVnodeNum = htonl(tsMnodeEqualVnodeNum);
|
||||
pStatus->clusterCfg.offlineThreshold = htonl(tsOfflineThreshold);
|
||||
pStatus->clusterCfg.statusInterval = htonl(tsStatusInterval);
|
||||
|
|
|
@ -564,15 +564,16 @@ typedef struct {
|
|||
|
||||
typedef struct {
|
||||
int32_t numOfMnodes; // tsNumOfMnodes
|
||||
int32_t enableBalance; // tsEnableBalance
|
||||
int32_t mnodeEqualVnodeNum; // tsMnodeEqualVnodeNum
|
||||
int32_t offlineThreshold; // tsOfflineThreshold
|
||||
int32_t statusInterval; // tsStatusInterval
|
||||
int32_t maxtablesPerVnode;
|
||||
int32_t maxVgroupsPerDb;
|
||||
char arbitrator[TSDB_EP_LEN]; // tsArbitrator
|
||||
char timezone[64]; // tsTimezone
|
||||
char locale[TSDB_LOCALE_LEN]; // tsLocale
|
||||
char charset[TSDB_LOCALE_LEN]; // tsCharset
|
||||
int32_t maxtablesPerVnode;
|
||||
int32_t maxVgroupsPerDb;
|
||||
} SClusterCfg;
|
||||
|
||||
typedef struct {
|
||||
|
|
|
@ -305,6 +305,7 @@ static void mnodeProcessCfgDnodeMsgRsp(SRpcMsg *rpcMsg) {
|
|||
|
||||
static bool mnodeCheckClusterCfgPara(const SClusterCfg *clusterCfg) {
|
||||
if (clusterCfg->numOfMnodes != htonl(tsNumOfMnodes)) return false;
|
||||
if (clusterCfg->enableBalance != htonl(tsEnableBalance)) return false;
|
||||
if (clusterCfg->mnodeEqualVnodeNum != htonl(tsMnodeEqualVnodeNum)) return false;
|
||||
if (clusterCfg->offlineThreshold != htonl(tsOfflineThreshold)) return false;
|
||||
if (clusterCfg->statusInterval != htonl(tsStatusInterval)) return false;
|
||||
|
|
Loading…
Reference in New Issue