未验证 提交 ed8c65b8 编写于 作者: S shenglian-zhou 提交者: GitHub

Merge pull request #9684 from taosdata/szhou/fix/dev/ts-1068

TS-1068: fix rolling upgrade version mismatch
...@@ -287,7 +287,7 @@ static void dnodeSendStatusMsg(void *handle, void *tmrId) { ...@@ -287,7 +287,7 @@ static void dnodeSendStatusMsg(void *handle, void *tmrId) {
dnodeGetCfg(&pStatus->dnodeId, pStatus->clusterId); dnodeGetCfg(&pStatus->dnodeId, pStatus->clusterId);
pStatus->dnodeId = htonl(dnodeGetDnodeId()); pStatus->dnodeId = htonl(dnodeGetDnodeId());
pStatus->version = htonl(tsVersion); pStatus->version = htonl(tsVersion >> 8);
pStatus->lastReboot = htonl(tsRebootTime); pStatus->lastReboot = htonl(tsRebootTime);
pStatus->numOfCores = htons((uint16_t) tsNumOfCores); pStatus->numOfCores = htons((uint16_t) tsNumOfCores);
pStatus->diskAvailable = tsAvailDataDirGB; pStatus->diskAvailable = tsAvailDataDirGB;
......
...@@ -530,7 +530,7 @@ static int32_t mnodeProcessDnodeStatusMsg(SMnodeMsg *pMsg) { ...@@ -530,7 +530,7 @@ static int32_t mnodeProcessDnodeStatusMsg(SMnodeMsg *pMsg) {
pStatus->numOfCores = htons(pStatus->numOfCores); pStatus->numOfCores = htons(pStatus->numOfCores);
uint32_t _version = htonl(pStatus->version); uint32_t _version = htonl(pStatus->version);
if (_version != tsVersion) { if (_version != tsVersion >> 8) {
pDnode = mnodeGetDnodeByEp(pStatus->dnodeEp); pDnode = mnodeGetDnodeByEp(pStatus->dnodeEp);
if (pDnode != NULL && pDnode->status != TAOS_DN_STATUS_READY) { if (pDnode != NULL && pDnode->status != TAOS_DN_STATUS_READY) {
pDnode->offlineReason = TAOS_DN_OFF_VERSION_NOT_MATCH; pDnode->offlineReason = TAOS_DN_OFF_VERSION_NOT_MATCH;
......
...@@ -225,7 +225,7 @@ class TDDnode: ...@@ -225,7 +225,7 @@ class TDDnode:
# self.cfg("logDir",self.logDir) # self.cfg("logDir",self.logDir)
# print(updatecfgDict) # print(updatecfgDict)
isFirstDir = 1 isFirstDir = 1
if updatecfgDict[0] and updatecfgDict[0][0]: if bool(updatecfgDict) and updatecfgDict[0] and updatecfgDict[0][0]:
print(updatecfgDict[0][0]) print(updatecfgDict[0][0])
for key,value in updatecfgDict[0][0].items(): for key,value in updatecfgDict[0][0].items():
if value == 'dataDir' : if value == 'dataDir' :
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册