From 8770762c1cae0f223736ec5a30b4c19ff987b8c7 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 10 Jul 2020 15:06:11 +0000 Subject: [PATCH] [TD-468] change code formats --- src/mnode/src/mnodeDb.c | 2 +- src/mnode/src/mnodeDnode.c | 8 ++++---- src/mnode/src/mnodeTable.c | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mnode/src/mnodeDb.c b/src/mnode/src/mnodeDb.c index 3723e66528..497d64eabf 100644 --- a/src/mnode/src/mnodeDb.c +++ b/src/mnode/src/mnodeDb.c @@ -38,7 +38,7 @@ #include "mnodeUser.h" #include "mnodeVgroup.h" -#define VG_LIST_SIZE 1 +#define VG_LIST_SIZE 8 static void * tsDbSdb = NULL; static int32_t tsDbUpdateSize; diff --git a/src/mnode/src/mnodeDnode.c b/src/mnode/src/mnodeDnode.c index 17bb8715a4..86eaaceef7 100644 --- a/src/mnode/src/mnodeDnode.c +++ b/src/mnode/src/mnodeDnode.c @@ -308,13 +308,13 @@ static bool mnodeCheckClusterCfgPara(const SClusterCfg *clusterCfg) { if (clusterCfg->mnodeEqualVnodeNum != htonl(tsMnodeEqualVnodeNum)) return false; if (clusterCfg->offlineThreshold != htonl(tsOfflineThreshold)) return false; if (clusterCfg->statusInterval != htonl(tsStatusInterval)) return false; - if (clusterCfg->maxtablesPerVnode != htonl(tsMaxTablePerVnode)) return false; - if (clusterCfg->maxVgroupsPerDb != htonl(tsMaxVgroupsPerDb)) return false; + if (clusterCfg->maxtablesPerVnode != htonl(tsMaxTablePerVnode)) return false; + if (clusterCfg->maxVgroupsPerDb != htonl(tsMaxVgroupsPerDb)) return false; if (0 != strncasecmp(clusterCfg->arbitrator, tsArbitrator, strlen(tsArbitrator))) return false; if (0 != strncasecmp(clusterCfg->timezone, tsTimezone, strlen(tsTimezone))) return false; - if (0 != strncasecmp(clusterCfg->locale, tsLocale, strlen(tsLocale))) return false; - if (0 != strncasecmp(clusterCfg->charset, tsCharset, strlen(tsCharset))) return false; + if (0 != strncasecmp(clusterCfg->locale, tsLocale, strlen(tsLocale))) return false; + if (0 != strncasecmp(clusterCfg->charset, tsCharset, strlen(tsCharset))) return false; return true; } diff --git a/src/mnode/src/mnodeTable.c b/src/mnode/src/mnodeTable.c index 3ada1165f2..58eaecb20a 100644 --- a/src/mnode/src/mnodeTable.c +++ b/src/mnode/src/mnodeTable.c @@ -1723,8 +1723,8 @@ static int32_t mnodeProcessCreateChildTableMsg(SMnodeMsg *pMsg) { if (pMsg->retry == 0) { if (pMsg->pTable == NULL) { - SVgObj *pVgroup; - int32_t sid; + SVgObj *pVgroup = NULL; + int32_t sid = 0; code = mnodeGetAvailableVgroup(pMsg, &pVgroup, &sid); if (code != TSDB_CODE_SUCCESS) { mDebug("app:%p:%p, table:%s, failed to get available vgroup, reason:%s", pMsg->rpcMsg.ahandle, pMsg, -- GitLab