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