diff --git a/include/dnode/bnode/bnode.h b/include/dnode/bnode/bnode.h index 3cc26861aba988856a2e951116765222adb4b8c8..7f7b8a8d53f1fa249704d6e5510273ae4247da4a 100644 --- a/include/dnode/bnode/bnode.h +++ b/include/dnode/bnode/bnode.h @@ -23,22 +23,18 @@ extern "C" { /* ------------------------ TYPES EXPOSED ------------------------ */ typedef struct SDnode SDnode; typedef struct SBnode SBnode; -typedef int32_t (*SendReqToDnodeFp)(SDnode *pDnode, struct SEpSet *epSet, struct SRpcMsg *rpcMsg); -typedef int32_t (*SendReqToMnodeFp)(SDnode *pDnode, struct SRpcMsg *rpcMsg); -typedef void (*SendRedirectRspFp)(SDnode *pDnode, struct SRpcMsg *rpcMsg); +typedef int32_t (*SendReqToDnodeFp)(SDnode *pDnode, struct SEpSet *epSet, struct SRpcMsg *pMsg); +typedef int32_t (*SendReqToMnodeFp)(SDnode *pDnode, struct SRpcMsg *pMsg); +typedef void (*SendRedirectRspFp)(SDnode *pDnode, struct SRpcMsg *pMsg); typedef struct { int64_t numOfErrors; } SBnodeLoad; typedef struct { - int32_t sver; -} SBnodeCfg; - -typedef struct { + int32_t sver; int32_t dnodeId; int64_t clusterId; - SBnodeCfg cfg; SDnode *pDnode; SendReqToDnodeFp sendReqToDnodeFp; SendReqToMnodeFp sendReqToMnodeFp; diff --git a/include/dnode/qnode/qnode.h b/include/dnode/qnode/qnode.h index 554c57a045436f9df54338a79bbb8d69ef4e3e7a..3de2986047c4b5bf1e047e294b46999149abd433 100644 --- a/include/dnode/qnode/qnode.h +++ b/include/dnode/qnode/qnode.h @@ -23,9 +23,9 @@ extern "C" { /* ------------------------ TYPES EXPOSED ------------------------ */ typedef struct SDnode SDnode; typedef struct SQnode SQnode; -typedef int32_t (*SendReqToDnodeFp)(SDnode *pDnode, struct SEpSet *epSet, struct SRpcMsg *rpcMsg); -typedef int32_t (*SendReqToMnodeFp)(SDnode *pDnode, struct SRpcMsg *rpcMsg); -typedef void (*SendRedirectRspFp)(SDnode *pDnode, struct SRpcMsg *rpcMsg); +typedef int32_t (*SendReqToDnodeFp)(SDnode *pDnode, struct SEpSet *epSet, struct SRpcMsg *pMsg); +typedef int32_t (*SendReqToMnodeFp)(SDnode *pDnode, struct SRpcMsg *pMsg); +typedef void (*SendRedirectRspFp)(SDnode *pDnode, struct SRpcMsg *pMsg); typedef struct { int64_t numOfStartTask; @@ -39,13 +39,9 @@ typedef struct { } SQnodeLoad; typedef struct { - int32_t sver; -} SQnodeCfg; - -typedef struct { + int32_t sver; int32_t dnodeId; int64_t clusterId; - SQnodeCfg cfg; SDnode *pDnode; SendReqToDnodeFp sendReqToDnodeFp; SendReqToMnodeFp sendReqToMnodeFp; diff --git a/include/dnode/snode/snode.h b/include/dnode/snode/snode.h index 43d3dd9b4b377fbee57f9cf9fd02c9f14699f77d..319708decc4e41abf60ec4358a740dc42f59ea21 100644 --- a/include/dnode/snode/snode.h +++ b/include/dnode/snode/snode.h @@ -23,22 +23,18 @@ extern "C" { /* ------------------------ TYPES EXPOSED ------------------------ */ typedef struct SDnode SDnode; typedef struct SSnode SSnode; -typedef int32_t (*SendReqToDnodeFp)(SDnode *pDnode, struct SEpSet *epSet, struct SRpcMsg *rpcMsg); -typedef int32_t (*SendReqToMnodeFp)(SDnode *pDnode, struct SRpcMsg *rpcMsg); -typedef void (*SendRedirectRspFp)(SDnode *pDnode, struct SRpcMsg *rpcMsg); +typedef int32_t (*SendReqToDnodeFp)(SDnode *pDnode, struct SEpSet *epSet, struct SRpcMsg *pMsg); +typedef int32_t (*SendReqToMnodeFp)(SDnode *pDnode, struct SRpcMsg *pMsg); +typedef void (*SendRedirectRspFp)(SDnode *pDnode, struct SRpcMsg *pMsg); typedef struct { int64_t numOfErrors; } SSnodeLoad; typedef struct { - int32_t sver; -} SSnodeCfg; - -typedef struct { + int32_t sver; int32_t dnodeId; int64_t clusterId; - SSnodeCfg cfg; SDnode *pDnode; SendReqToDnodeFp sendReqToDnodeFp; SendReqToMnodeFp sendReqToMnodeFp; diff --git a/source/dnode/bnode/inc/bndInt.h b/source/dnode/bnode/inc/bndInt.h index cddb1e50f14526df43e7e2234950a71ac74be864..4a0d16a7498c1166b3d4742111cf7b2f676abbcc 100644 --- a/source/dnode/bnode/inc/bndInt.h +++ b/source/dnode/bnode/inc/bndInt.h @@ -30,12 +30,7 @@ extern "C" { #endif typedef struct SBnode { - int32_t dnodeId; - int64_t clusterId; - SBnodeCfg cfg; - SendReqToDnodeFp sendReqToDnodeFp; - SendReqToMnodeFp sendReqToMnodeFp; - SendRedirectRspFp sendRedirectRspFp; + SBnodeOpt opt; } SBnode; #ifdef __cplusplus diff --git a/source/dnode/mgmt/impl/src/dndBnode.c b/source/dnode/mgmt/impl/src/dndBnode.c index ce058ebba43e5ace9e538e62ac626b32aff48754..f26ec72f1d369215b3f7d8b95b2f4605e752df5a 100644 --- a/source/dnode/mgmt/impl/src/dndBnode.c +++ b/source/dnode/mgmt/impl/src/dndBnode.c @@ -179,7 +179,7 @@ static void dndBuildBnodeOption(SDnode *pDnode, SBnodeOpt *pOption) { pOption->sendRedirectRspFp = dndSendRedirectRsp; pOption->dnodeId = dndGetDnodeId(pDnode); pOption->clusterId = dndGetClusterId(pDnode); - pOption->cfg.sver = pDnode->env.sver; + pOption->sver = pDnode->env.sver; } static int32_t dndOpenBnode(SDnode *pDnode) { diff --git a/source/dnode/mgmt/impl/src/dndQnode.c b/source/dnode/mgmt/impl/src/dndQnode.c index 9a8d49010cc499add3f7cba10108df1f4e3a0449..fa53375381298407911c6bd8a01ba28ce645ed5d 100644 --- a/source/dnode/mgmt/impl/src/dndQnode.c +++ b/source/dnode/mgmt/impl/src/dndQnode.c @@ -185,7 +185,7 @@ static void dndBuildQnodeOption(SDnode *pDnode, SQnodeOpt *pOption) { pOption->sendRedirectRspFp = dndSendRedirectRsp; pOption->dnodeId = dndGetDnodeId(pDnode); pOption->clusterId = dndGetClusterId(pDnode); - pOption->cfg.sver = pDnode->env.sver; + pOption->sver = pDnode->env.sver; } static int32_t dndOpenQnode(SDnode *pDnode) { diff --git a/source/dnode/mgmt/impl/src/dndSnode.c b/source/dnode/mgmt/impl/src/dndSnode.c index a07f02e761ddec59e69b055a7d5f7d81dab1bdd9..6f22e5b00c9564e3a4972510e80f574e9ea06d01 100644 --- a/source/dnode/mgmt/impl/src/dndSnode.c +++ b/source/dnode/mgmt/impl/src/dndSnode.c @@ -179,7 +179,7 @@ static void dndBuildSnodeOption(SDnode *pDnode, SSnodeOpt *pOption) { pOption->sendRedirectRspFp = dndSendRedirectRsp; pOption->dnodeId = dndGetDnodeId(pDnode); pOption->clusterId = dndGetClusterId(pDnode); - pOption->cfg.sver = pDnode->env.sver; + pOption->sver = pDnode->env.sver; } static int32_t dndOpenSnode(SDnode *pDnode) { diff --git a/source/dnode/qnode/inc/qndInt.h b/source/dnode/qnode/inc/qndInt.h index 529c407efa41c69cc0a9fc563f4a6464ea8c162c..0f8e65de7ec300a289fe2c07a1c6d5cedec3d003 100644 --- a/source/dnode/qnode/inc/qndInt.h +++ b/source/dnode/qnode/inc/qndInt.h @@ -29,12 +29,7 @@ extern "C" { #endif typedef struct SQnode { - int32_t dnodeId; - int64_t clusterId; - SQnodeCfg cfg; - SendReqToDnodeFp sendReqToDnodeFp; - SendReqToMnodeFp sendReqToMnodeFp; - SendRedirectRspFp sendRedirectRspFp; + SQnodeOpt opt; } SQnode; #ifdef __cplusplus diff --git a/source/dnode/snode/inc/sndInt.h b/source/dnode/snode/inc/sndInt.h index 3b41c7f4b170c6ae3ede30d9b034548073b8492f..aff82e4ae72f0f54bda843da9fc5b5b96091ef0b 100644 --- a/source/dnode/snode/inc/sndInt.h +++ b/source/dnode/snode/inc/sndInt.h @@ -29,12 +29,7 @@ extern "C" { #endif typedef struct SSnode { - int32_t dnodeId; - int64_t clusterId; - SSnodeCfg cfg; - SendReqToDnodeFp sendReqToDnodeFp; - SendReqToMnodeFp sendReqToMnodeFp; - SendRedirectRspFp sendRedirectRspFp; + SSnodeOpt cfg; } SSnode; #ifdef __cplusplus