Merge pull request #1646 from taosdata/feature/mpeer

merge from wal
This commit is contained in:
slguan 2020-04-18 12:36:44 +08:00 committed by GitHub
commit 3330d8d08f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

View File

@ -402,8 +402,10 @@ static int32_t mgmtCreateDnode(uint32_t ip) {
int32_t code = sdbInsertRow(&oper);
if (code != TSDB_CODE_SUCCESS) {
int dnodeId = pDnode->dnodeId;
tfree(pDnode);
code = TSDB_CODE_SDB_ERROR;
mError("failed to create dnode:%d, result:%s", dnodeId, tstrerror(code));
return TSDB_CODE_SDB_ERROR;
}
mPrint("dnode:%d is created, result:%s", pDnode->dnodeId, tstrerror(code));

View File

@ -0,0 +1,15 @@
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -m 192.168.0.1 -i 192.168.0.1
system sh/deploy.sh -n dnode2 -m 192.168.0.1 -i 192.168.0.2
system sh/deploy.sh -n dnode3 -m 192.168.0.1 -i 192.168.0.3
system sh/cfg.sh -n dnode1 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode3 -c numOfMPeers -v 3
system sh/exec_up.sh -n dnode1 -s start
system sh/exec_up.sh -n dnode2 -s start
sql connect
sleep 2000
sql create dnode 192.168.0.2