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

[TD-374] assert while alter database option maxTables

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