提交 7a3f3cd6 编写于 作者: S Shengliang Guan

[TD-374] assert while alter database option maxTables

上级 4cb6ed86
...@@ -121,6 +121,9 @@ static int32_t mgmtMnodeActionRestored() { ...@@ -121,6 +121,9 @@ static int32_t mgmtMnodeActionRestored() {
} }
sdbFreeIter(pIter); sdbFreeIter(pIter);
} }
mgmtUpdateMnodeIpSet();
return TSDB_CODE_SUCCESS; return TSDB_CODE_SUCCESS;
} }
...@@ -203,6 +206,8 @@ void mgmtUpdateMnodeIpSet() { ...@@ -203,6 +206,8 @@ void mgmtUpdateMnodeIpSet() {
SRpcIpSet *ipSet = &tsMnodeRpcIpSet; SRpcIpSet *ipSet = &tsMnodeRpcIpSet;
SDMMnodeInfos *mnodes = &tsMnodeInfos; SDMMnodeInfos *mnodes = &tsMnodeInfos;
mPrint("update mnodes ipset, numOfIps:%d ", mgmtGetMnodesNum());
mgmtMnodeWrLock(); mgmtMnodeWrLock();
int32_t index = 0; int32_t index = 0;
...@@ -223,13 +228,16 @@ void mgmtUpdateMnodeIpSet() { ...@@ -223,13 +228,16 @@ void mgmtUpdateMnodeIpSet() {
mnodes->inUse = index; mnodes->inUse = index;
} }
mPrint("mnode:%d, ep:%s %s", index, pMnode->pDnode->dnodeFqdn, pMnode->role == TAOS_SYNC_ROLE_MASTER ? "master" : "");
ipSet->numOfIps++; ipSet->numOfIps++;
index++; index++;
mgmtDecMnodeRef(pMnode); mgmtDecMnodeRef(pMnode);
} }
mnodes->nodeNum = index; mnodes->nodeNum = index;
sdbFreeIter(pIter); sdbFreeIter(pIter);
mgmtMnodeUnLock(); mgmtMnodeUnLock();
......
...@@ -409,7 +409,7 @@ int tsdbWriteCompInfo(SRWHelper *pHelper) { ...@@ -409,7 +409,7 @@ int tsdbWriteCompInfo(SRWHelper *pHelper) {
if (pIdx->offset > 0) { if (pIdx->offset > 0) {
pIdx->offset = lseek(pHelper->files.nHeadF.fd, 0, SEEK_END); pIdx->offset = lseek(pHelper->files.nHeadF.fd, 0, SEEK_END);
if (pIdx->offset < 0) return -1; if (pIdx->offset < 0) return -1;
ASSERT(pIdx->offset >= tsizeof(pHelper->pCompIdx)); ASSERT(pIdx->offset >= TSDB_FILE_HEAD_SIZE);
if (tsendfile(pHelper->files.nHeadF.fd, pHelper->files.headF.fd, NULL, pIdx->len) < pIdx->len) return -1; if (tsendfile(pHelper->files.nHeadF.fd, pHelper->files.headF.fd, NULL, pIdx->len) < pIdx->len) return -1;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册