fix invalid write while update mnode set

This commit is contained in:
Shengliang Guan 2020-05-23 13:14:38 +08:00
parent 68b769cfb7
commit f398488aac
2 changed files with 4 additions and 0 deletions

View File

@ -37,6 +37,7 @@ static SDnodeRunStatus tsDnodeRunStatus = TSDB_DNODE_RUN_STATUS_STOPPED;
int32_t dnodeInitSystem() {
dnodeSetRunStatus(TSDB_DNODE_RUN_STATUS_INITIALIZE);
tscEmbedded = 1;
taosBlockSIGPIPE();
taosResolveCRC();
taosInitGlobalCfg();
taosReadGlobalLogCfg();

View File

@ -210,6 +210,9 @@ void mgmtUpdateMnodeIpSet() {
mgmtMnodeWrLock();
memset(ipSet, 0, sizeof(tsMnodeRpcIpSet));
memset(mnodes, 0, sizeof(SDMMnodeInfos));
int32_t index = 0;
void * pIter = NULL;
while (1) {