diff --git a/src/dnode/src/dnodeVnodes.c b/src/dnode/src/dnodeVnodes.c index a5b0e9fe30e88f89af2e79af16602dac9500a305..0f2e6cd4284fabd7836cc990696f4dfc2c25538b 100644 --- a/src/dnode/src/dnodeVnodes.c +++ b/src/dnode/src/dnodeVnodes.c @@ -253,7 +253,7 @@ static void dnodeSendStatusMsg(void *handle, void *tmrId) { dnodeGetCfg(&pStatus->dnodeId, pStatus->clusterId); pStatus->dnodeId = htonl(dnodeGetDnodeId()); - pStatus->version = htonl(tsVersion); + pStatus->version = htonl(tsVersion >> 8); pStatus->lastReboot = htonl(tsRebootTime); pStatus->numOfCores = htons((uint16_t) tsNumOfCores); pStatus->diskAvailable = tsAvailDataDirGB; diff --git a/src/mnode/src/mnodeDnode.c b/src/mnode/src/mnodeDnode.c index 02cf1c782c54f61e9bf113d7319e1009e4e7d946..5ea6157b6f0432f1ed458e8eca828165835143a2 100644 --- a/src/mnode/src/mnodeDnode.c +++ b/src/mnode/src/mnodeDnode.c @@ -524,7 +524,7 @@ static int32_t mnodeProcessDnodeStatusMsg(SMnodeMsg *pMsg) { pStatus->numOfCores = htons(pStatus->numOfCores); uint32_t _version = htonl(pStatus->version); - if (_version != tsVersion) { + if (_version != tsVersion >> 8) { pDnode = mnodeGetDnodeByEp(pStatus->dnodeEp); if (pDnode != NULL && pDnode->status != TAOS_DN_STATUS_READY) { pDnode->offlineReason = TAOS_DN_OFF_VERSION_NOT_MATCH; diff --git a/tests/pytest/util/dnodes.py b/tests/pytest/util/dnodes.py index 0128c8caa29a75693ab88745cab9e64f07a82cc8..397c56acd25f163728c76e3662c21a2e22699537 100644 --- a/tests/pytest/util/dnodes.py +++ b/tests/pytest/util/dnodes.py @@ -112,7 +112,7 @@ class TDSimClient: # update extra client config clientCfgkeys = ["clientMerge"] - if updatecfgDict[0] and updatecfgDict[0][0]: + if bool(updatecfgDict) and updatecfgDict[0] and updatecfgDict[0][0]: for key, value in updatecfgDict[0][0].items(): if key in clientCfgkeys: self.cfg(key, value)