TD-1382
This commit is contained in:
parent
1d1ee98506
commit
7334f5196e
|
@ -146,8 +146,8 @@ void dnodeProcessModuleStatus(uint32_t moduleStatus) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void dnodeCheckModules() {
|
bool dnodeCheckMnodeStarting() {
|
||||||
if (tsModuleStatus & TSDB_MOD_MNODE) return;
|
if (tsModuleStatus & TSDB_MOD_MNODE) return false;
|
||||||
|
|
||||||
SDMMnodeInfos *mnodes = dnodeGetMnodeInfos();
|
SDMMnodeInfos *mnodes = dnodeGetMnodeInfos();
|
||||||
for (int32_t i = 0; i < mnodes->nodeNum; ++i) {
|
for (int32_t i = 0; i < mnodes->nodeNum; ++i) {
|
||||||
|
@ -156,7 +156,9 @@ void dnodeCheckModules() {
|
||||||
uint32_t moduleStatus = tsModuleStatus | (1 << TSDB_MOD_MNODE);;
|
uint32_t moduleStatus = tsModuleStatus | (1 << TSDB_MOD_MNODE);;
|
||||||
dInfo("start mnode module, module status:%d, new status:%d", tsModuleStatus, moduleStatus);
|
dInfo("start mnode module, module status:%d, new status:%d", tsModuleStatus, moduleStatus);
|
||||||
dnodeProcessModuleStatus(moduleStatus);
|
dnodeProcessModuleStatus(moduleStatus);
|
||||||
break;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,7 @@ void dnodeGetMnodeEpSetForPeer(void *epSet);
|
||||||
void dnodeGetMnodeEpSetForShell(void *epSet);
|
void dnodeGetMnodeEpSetForShell(void *epSet);
|
||||||
void * dnodeGetMnodeInfos();
|
void * dnodeGetMnodeInfos();
|
||||||
int32_t dnodeGetDnodeId();
|
int32_t dnodeGetDnodeId();
|
||||||
void dnodeCheckModules();
|
bool dnodeCheckMnodeStarting();
|
||||||
|
|
||||||
void dnodeAddClientRspHandle(uint8_t msgType, void (*fp)(SRpcMsg *rpcMsg));
|
void dnodeAddClientRspHandle(uint8_t msgType, void (*fp)(SRpcMsg *rpcMsg));
|
||||||
void dnodeSendMsgToDnode(SRpcEpSet *epSet, SRpcMsg *rpcMsg);
|
void dnodeSendMsgToDnode(SRpcEpSet *epSet, SRpcMsg *rpcMsg);
|
||||||
|
|
|
@ -298,8 +298,9 @@ static void sdbUpdateSyncTmrFp(void *param, void *tmrId) { sdbUpdateSync(); }
|
||||||
void sdbUpdateSync() {
|
void sdbUpdateSync() {
|
||||||
if (!mnodeIsRunning()) {
|
if (!mnodeIsRunning()) {
|
||||||
mDebug("mnode not start yet, update sync info later");
|
mDebug("mnode not start yet, update sync info later");
|
||||||
dnodeCheckModules();
|
if (dnodeCheckMnodeStarting()) {
|
||||||
taosTmrReset(sdbUpdateSyncTmrFp, 1000, NULL, tsMnodeTmr, &tsUpdateSyncTmr);
|
taosTmrReset(sdbUpdateSyncTmrFp, 1000, NULL, tsMnodeTmr, &tsUpdateSyncTmr);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
mDebug("update sync info in sdb");
|
mDebug("update sync info in sdb");
|
||||||
|
|
|
@ -53,7 +53,7 @@ system sh/exec.sh -n dnode2 -s start
|
||||||
system sh/exec.sh -n dnode3 -s start
|
system sh/exec.sh -n dnode3 -s start
|
||||||
sql create dnode $hostname2
|
sql create dnode $hostname2
|
||||||
sql create dnode $hostname3
|
sql create dnode $hostname3
|
||||||
sleep 3000
|
sleep 5000
|
||||||
|
|
||||||
$sleepTimer = 3000
|
$sleepTimer = 3000
|
||||||
|
|
||||||
|
@ -225,6 +225,7 @@ if $data00 != $totalRows then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print ============== step5: stop dnode2, and remove its vnode
|
print ============== step5: stop dnode2, and remove its vnode
|
||||||
|
sleep 5000
|
||||||
system sh/exec.sh -n dnode2 -s stop -x SIGINT
|
system sh/exec.sh -n dnode2 -s stop -x SIGINT
|
||||||
sleep $sleepTimer
|
sleep $sleepTimer
|
||||||
|
|
||||||
|
|
|
@ -193,6 +193,7 @@ if $data00 != $totalRows then
|
||||||
endi
|
endi
|
||||||
|
|
||||||
print ============== step5: stop dnode1
|
print ============== step5: stop dnode1
|
||||||
|
sleep 5000
|
||||||
system sh/exec.sh -n dnode1 -s stop
|
system sh/exec.sh -n dnode1 -s stop
|
||||||
sleep 3000
|
sleep 3000
|
||||||
|
|
||||||
|
|
|
@ -18,13 +18,14 @@ system sh/cfg.sh -n dnode3 -c numOfMnodes -v 3
|
||||||
|
|
||||||
print ========== step1
|
print ========== step1
|
||||||
system sh/exec.sh -n dnode1 -s start
|
system sh/exec.sh -n dnode1 -s start
|
||||||
|
sleep 3000
|
||||||
sql connect
|
sql connect
|
||||||
|
|
||||||
sql create dnode $hostname2
|
sql create dnode $hostname2
|
||||||
system sh/exec.sh -n dnode2 -s start
|
system sh/exec.sh -n dnode2 -s start
|
||||||
sleep 3000
|
|
||||||
sql create dnode $hostname3
|
sql create dnode $hostname3
|
||||||
system sh/exec.sh -n dnode3 -s start
|
system sh/exec.sh -n dnode3 -s start
|
||||||
sleep 3000
|
sleep 5000
|
||||||
|
|
||||||
sql show dnodes
|
sql show dnodes
|
||||||
print dnode1 $data5_1
|
print dnode1 $data5_1
|
||||||
|
|
Loading…
Reference in New Issue