diff --git a/source/common/src/systable.c b/source/common/src/systable.c index 81682bb734252d85ff8af19eda3edb506d17f8a2..e4e5abe148130b031036ed2101b7d8075ecc687e 100644 --- a/source/common/src/systable.c +++ b/source/common/src/systable.c @@ -26,7 +26,7 @@ static const SSysDbTableSchema dnodesSchema[] = { {.name = "id", .bytes = 2, .type = TSDB_DATA_TYPE_SMALLINT}, {.name = "endpoint", .bytes = TSDB_EP_LEN + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, {.name = "vnodes", .bytes = 2, .type = TSDB_DATA_TYPE_SMALLINT}, - {.name = "max_vnodes", .bytes = 2, .type = TSDB_DATA_TYPE_SMALLINT}, + {.name = "support_vnodes", .bytes = 2, .type = TSDB_DATA_TYPE_SMALLINT}, {.name = "status", .bytes = 10 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, {.name = "create_time", .bytes = 8, .type = TSDB_DATA_TYPE_TIMESTAMP}, {.name = "note", .bytes = 256 + VARSTR_HEADER_SIZE, .type = TSDB_DATA_TYPE_VARCHAR}, diff --git a/source/dnode/mgmt/exe/dmMain.c b/source/dnode/mgmt/exe/dmMain.c index 21776d71f6280b4a24f68ad3f6409268c171ab5d..81df34ef4a827ae16b64d5d422e129a0c42df165 100644 --- a/source/dnode/mgmt/exe/dmMain.c +++ b/source/dnode/mgmt/exe/dmMain.c @@ -14,7 +14,7 @@ */ #define _DEFAULT_SOURCE -#include "dmImp.h" +#include "dmMgmt.h" #include "tconfig.h" #define DM_APOLLO_URL "The apollo string to use when configuring the server, such as: -a 'jsonFile:./tests/cfg.json', cfg.json text can be '{\"fqdn\":\"td1\"}'." diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c index ea89b672a8f06c76b53dd21d42caffd7c649c5c6..9fedaa37447cb55410dde467bf98239045547dad 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmHandle.c @@ -27,8 +27,8 @@ static void dmUpdateDnodeCfg(SDnodeMgmt *pMgmt, SDnodeCfg *pCfg) { } } -static int32_t dmProcessStatusRsp(SDnodeMgmt *pMgmt, SRpcMsg *pRsp) { - if (pRsp->code != TSDB_CODE_SUCCESS) { +static void dmProcessStatusRsp(SDnodeMgmt *pMgmt, SRpcMsg *pRsp) { + if (pRsp->code != 0) { if (pRsp->code == TSDB_CODE_MND_DNODE_NOT_EXIST && !pMgmt->data.dropped && pMgmt->data.dnodeId > 0) { dInfo("dnode:%d, set to dropped since not exist in mnode", pMgmt->data.dnodeId); pMgmt->data.dropped = 1; @@ -45,8 +45,6 @@ static int32_t dmProcessStatusRsp(SDnodeMgmt *pMgmt, SRpcMsg *pRsp) { rpcFreeCont(pRsp->pCont); tFreeSStatusRsp(&statusRsp); } - - return TSDB_CODE_SUCCESS; } void dmSendStatusReq(SDnodeMgmt *pMgmt) { diff --git a/source/dnode/mgmt/mgmt_dnode/src/dmInt.c b/source/dnode/mgmt/mgmt_dnode/src/dmInt.c index e42c5372acd8c6642560ce45463495b281a86c8f..7eabf9f1b7cbfc5b8bc5356f7c1faf36d42c29be 100644 --- a/source/dnode/mgmt/mgmt_dnode/src/dmInt.c +++ b/source/dnode/mgmt/mgmt_dnode/src/dmInt.c @@ -86,6 +86,7 @@ static int32_t dmOpenMgmt(const SMgmtInputOpt *pInput, SMgmtOutputOpt *pOutput) } pOutput->pMgmt = pMgmt; + pOutput->mnodeEps = pMgmt->data.mnodeEps; dInfo("dnode-mgmt is initialized"); return 0; } diff --git a/source/dnode/mgmt/node_mgmt/inc/dmImp.h b/source/dnode/mgmt/node_mgmt/inc/dmMgmt.h similarity index 100% rename from source/dnode/mgmt/node_mgmt/inc/dmImp.h rename to source/dnode/mgmt/node_mgmt/inc/dmMgmt.h diff --git a/source/dnode/mgmt/node_mgmt/src/dmObj.c b/source/dnode/mgmt/node_mgmt/src/dmMgmt.c similarity index 99% rename from source/dnode/mgmt/node_mgmt/src/dmObj.c rename to source/dnode/mgmt/node_mgmt/src/dmMgmt.c index acc2b67d71240a73e4b85f07c6f1e433302980dd..e389329a20f233c873b15201d333658eb9a47570 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmObj.c +++ b/source/dnode/mgmt/node_mgmt/src/dmMgmt.c @@ -14,7 +14,7 @@ */ #define _DEFAULT_SOURCE -#include "dmImp.h" +#include "dmMgmt.h" static bool dmIsNodeDeployedFp(SDnode *pDnode, EDndNodeType ntype) { return pDnode->wrappers[ntype].required; } diff --git a/source/dnode/mgmt/node_mgmt/src/dmExec.c b/source/dnode/mgmt/node_mgmt/src/dmRun.c similarity index 99% rename from source/dnode/mgmt/node_mgmt/src/dmExec.c rename to source/dnode/mgmt/node_mgmt/src/dmRun.c index 7fb89de59ea29e46c98f7b6cc3d12d0cde3f5d2c..fd551f35745916907797a856202e18d5925eefec 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmExec.c +++ b/source/dnode/mgmt/node_mgmt/src/dmRun.c @@ -14,7 +14,7 @@ */ #define _DEFAULT_SOURCE -#include "dmImp.h" +#include "dmMgmt.h" static int32_t dmInitParentProc(SMgmtWrapper *pWrapper) { int32_t shmsize = tsMnodeShmSize; diff --git a/source/dnode/mgmt/node_mgmt/src/dmTransport.c b/source/dnode/mgmt/node_mgmt/src/dmTransport.c index 486eef78d68619a63c8b9fe067f6577f9ad13a21..99a1fce3a89a94182c4d411d431e5f2888afd0bd 100644 --- a/source/dnode/mgmt/node_mgmt/src/dmTransport.c +++ b/source/dnode/mgmt/node_mgmt/src/dmTransport.c @@ -14,7 +14,7 @@ */ #define _DEFAULT_SOURCE -#include "dmImp.h" +#include "dmMgmt.h" #include "qworker.h" #define INTERNAL_USER "_dnd"