statusClientRpc
This commit is contained in:
parent
afac844656
commit
0188289308
|
@ -52,7 +52,6 @@ typedef struct {
|
||||||
void* data;
|
void* data;
|
||||||
void* mgmt;
|
void* mgmt;
|
||||||
void* clientRpc;
|
void* clientRpc;
|
||||||
void* statusClientRpc;
|
|
||||||
void* serverRpc;
|
void* serverRpc;
|
||||||
PutToQueueFp putToQueueFp;
|
PutToQueueFp putToQueueFp;
|
||||||
GetQueueSizeFp qsizeFp;
|
GetQueueSizeFp qsizeFp;
|
||||||
|
|
|
@ -160,7 +160,7 @@ void dmSendStatusReq(SDnodeMgmt *pMgmt) {
|
||||||
|
|
||||||
SEpSet epSet = {0};
|
SEpSet epSet = {0};
|
||||||
dmGetMnodeEpSet(pMgmt->pData, &epSet);
|
dmGetMnodeEpSet(pMgmt->pData, &epSet);
|
||||||
rpcSendRecvWithTimeout(pMgmt->msgCb.statusClientRpc, &epSet, &rpcMsg, &rpcRsp, 5000);
|
rpcSendRecvWithTimeout(pMgmt->msgCb.clientRpc, &epSet, &rpcMsg, &rpcRsp, 5000);
|
||||||
if (rpcRsp.code != 0) {
|
if (rpcRsp.code != 0) {
|
||||||
dmRotateMnodeEpSet(pMgmt->pData);
|
dmRotateMnodeEpSet(pMgmt->pData);
|
||||||
char tbuf[256];
|
char tbuf[256];
|
||||||
|
|
|
@ -48,7 +48,6 @@ typedef struct {
|
||||||
typedef struct {
|
typedef struct {
|
||||||
void *serverRpc;
|
void *serverRpc;
|
||||||
void *clientRpc;
|
void *clientRpc;
|
||||||
void *statusClientRpc;
|
|
||||||
SDnodeHandle msgHandles[TDMT_MAX];
|
SDnodeHandle msgHandles[TDMT_MAX];
|
||||||
} SDnodeTrans;
|
} SDnodeTrans;
|
||||||
|
|
||||||
|
|
|
@ -393,11 +393,11 @@ int32_t dmInitStatusClient(SDnode *pDnode) {
|
||||||
rpcInit.timeToGetConn = tsTimeToGetAvailableConn;
|
rpcInit.timeToGetConn = tsTimeToGetAvailableConn;
|
||||||
taosVersionStrToInt(version, &(rpcInit.compatibilityVer));
|
taosVersionStrToInt(version, &(rpcInit.compatibilityVer));
|
||||||
|
|
||||||
pTrans->statusClientRpc = rpcOpen(&rpcInit);
|
// pTrans->statusClientRpc = rpcOpen(&rpcInit);
|
||||||
if (pTrans->statusClientRpc == NULL) {
|
// if (pTrans->statusClientRpc == NULL) {
|
||||||
dError("failed to init dnode rpc status client");
|
// dError("failed to init dnode rpc status client");
|
||||||
return -1;
|
// return -1;
|
||||||
}
|
// }
|
||||||
|
|
||||||
dDebug("dnode rpc status client is initialized");
|
dDebug("dnode rpc status client is initialized");
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -413,11 +413,11 @@ void dmCleanupClient(SDnode *pDnode) {
|
||||||
}
|
}
|
||||||
void dmCleanupStatusClient(SDnode *pDnode) {
|
void dmCleanupStatusClient(SDnode *pDnode) {
|
||||||
SDnodeTrans *pTrans = &pDnode->trans;
|
SDnodeTrans *pTrans = &pDnode->trans;
|
||||||
if (pTrans->statusClientRpc) {
|
// if (pTrans->statusClientRpc) {
|
||||||
rpcClose(pTrans->statusClientRpc);
|
// rpcClose(pTrans->statusClientRpc);
|
||||||
pTrans->statusClientRpc = NULL;
|
// pTrans->statusClientRpc = NULL;
|
||||||
dDebug("dnode rpc status client is closed");
|
// dDebug("dnode rpc status client is closed");
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
int32_t dmInitServer(SDnode *pDnode) {
|
int32_t dmInitServer(SDnode *pDnode) {
|
||||||
|
@ -457,7 +457,6 @@ void dmCleanupServer(SDnode *pDnode) {
|
||||||
SMsgCb dmGetMsgcb(SDnode *pDnode) {
|
SMsgCb dmGetMsgcb(SDnode *pDnode) {
|
||||||
SMsgCb msgCb = {
|
SMsgCb msgCb = {
|
||||||
.clientRpc = pDnode->trans.clientRpc,
|
.clientRpc = pDnode->trans.clientRpc,
|
||||||
.statusClientRpc = pDnode->trans.statusClientRpc,
|
|
||||||
.serverRpc = pDnode->trans.serverRpc,
|
.serverRpc = pDnode->trans.serverRpc,
|
||||||
.sendReqFp = dmSendReq,
|
.sendReqFp = dmSendReq,
|
||||||
.sendRspFp = dmSendRsp,
|
.sendRspFp = dmSendRsp,
|
||||||
|
|
Loading…
Reference in New Issue