refactor: format code

This commit is contained in:
Shengliang Guan 2023-03-23 22:31:20 +08:00
parent 39f6ce1694
commit 8d1224ce22
2 changed files with 8 additions and 7 deletions

View File

@ -368,11 +368,10 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) {
}
int64_t clusterid = mndGetClusterId(pMnode);
if(statusReq.clusterId != 0 && statusReq.clusterId != clusterid)
{
int32_t err = TSDB_CODE_MND_DNODE_DIFF_CLUSTER;
mWarn("dnode:%d, %s, its clusterid:%" PRId64 " differ from current cluster:%" PRId64 ", code:0x%x", statusReq.dnodeId, statusReq.dnodeEp, statusReq.clusterId, clusterid, err);
if (statusReq.clusterId != 0 && statusReq.clusterId != clusterid) {
code = TSDB_CODE_MND_DNODE_DIFF_CLUSTER;
mWarn("dnode:%d, %s, its clusterid:%" PRId64 " differ from current cluster:%" PRId64 ", code:0x%x",
statusReq.dnodeId, statusReq.dnodeEp, statusReq.clusterId, clusterid, code);
goto _OVER;
}

View File

@ -2287,9 +2287,11 @@ int32_t syncNodeOnHeartbeat(SSyncNode* ths, const SRpcMsg* pRpcMsg) {
int64_t timeDiff = tsMs - pMsg->timeStamp;
syncLogRecvHeartbeat(ths, pMsg, timeDiff, tbuf);
if(!syncNodeInRaftGroup(ths, &pMsg->srcId))
{
sWarn("vgId:%d, drop heartbeat msg from dnode:%d, because it come from another cluster:%d, differ from current cluster:%d", ths->vgId, DID(&(pMsg->srcId)), CID(&(pMsg->srcId)) , CID(&(ths->myRaftId)));
if (!syncNodeInRaftGroup(ths, &pMsg->srcId)) {
sWarn(
"vgId:%d, drop heartbeat msg from dnode:%d, because it come from another cluster:%d, differ from current "
"cluster:%d",
ths->vgId, DID(&(pMsg->srcId)), CID(&(pMsg->srcId)), CID(&(ths->myRaftId)));
return 0;
}