提交 d226214f 编写于 作者: H hjxilinx

Merge branch 'develop' into feature/query

...@@ -311,8 +311,6 @@ typedef struct SSqlObj { ...@@ -311,8 +311,6 @@ typedef struct SSqlObj {
void (*fp)(); void (*fp)();
void (*fetchFp)(); void (*fetchFp)();
void * param; void * param;
uint32_t ip;
short vnode;
int64_t stime; int64_t stime;
uint32_t queryId; uint32_t queryId;
void * pStream; void * pStream;
......
...@@ -26,6 +26,7 @@ struct SDnodeObj; ...@@ -26,6 +26,7 @@ struct SDnodeObj;
int32_t balanceInit(); int32_t balanceInit();
void balanceCleanUp(); void balanceCleanUp();
void balanceNotify(); void balanceNotify();
void balanceUpdateMgmt();
void balanceReset(); void balanceReset();
int32_t balanceAllocVnodes(struct SVgObj *pVgroup); int32_t balanceAllocVnodes(struct SVgObj *pVgroup);
int32_t balanceDropDnode(struct SDnodeObj *pDnode); int32_t balanceDropDnode(struct SDnodeObj *pDnode);
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
int32_t balanceInit() { return TSDB_CODE_SUCCESS; } int32_t balanceInit() { return TSDB_CODE_SUCCESS; }
void balanceCleanUp() {} void balanceCleanUp() {}
void balanceNotify() {} void balanceNotify() {}
void balanceUpdateMgmt() {}
void balanceReset() {} void balanceReset() {}
int32_t balanceAllocVnodes(SVgObj *pVgroup) { int32_t balanceAllocVnodes(SVgObj *pVgroup) {
......
...@@ -322,6 +322,7 @@ void mgmtProcessDnodeStatusMsg(SRpcMsg *rpcMsg) { ...@@ -322,6 +322,7 @@ void mgmtProcessDnodeStatusMsg(SRpcMsg *rpcMsg) {
if (pDnode->status == TAOS_DN_STATUS_OFFLINE) { if (pDnode->status == TAOS_DN_STATUS_OFFLINE) {
mTrace("dnode:%d, from offline to online", pDnode->dnodeId); mTrace("dnode:%d, from offline to online", pDnode->dnodeId);
pDnode->status = TAOS_DN_STATUS_READY; pDnode->status = TAOS_DN_STATUS_READY;
balanceUpdateMgmt();
balanceNotify(); balanceNotify();
} }
......
...@@ -219,7 +219,7 @@ void *rpcOpen(const SRpcInit *pInit) { ...@@ -219,7 +219,7 @@ void *rpcOpen(const SRpcInit *pInit) {
pRpc->numOfThreads = pInit->numOfThreads>TSDB_MAX_RPC_THREADS ? TSDB_MAX_RPC_THREADS:pInit->numOfThreads; pRpc->numOfThreads = pInit->numOfThreads>TSDB_MAX_RPC_THREADS ? TSDB_MAX_RPC_THREADS:pInit->numOfThreads;
pRpc->localPort = pInit->localPort; pRpc->localPort = pInit->localPort;
pRpc->afp = pInit->afp; pRpc->afp = pInit->afp;
pRpc->sessions = pInit->sessions; pRpc->sessions = pInit->sessions+1;
if (pInit->user) strcpy(pRpc->user, pInit->user); if (pInit->user) strcpy(pRpc->user, pInit->user);
if (pInit->secret) strcpy(pRpc->secret, pInit->secret); if (pInit->secret) strcpy(pRpc->secret, pInit->secret);
if (pInit->ckey) strcpy(pRpc->ckey, pInit->ckey); if (pInit->ckey) strcpy(pRpc->ckey, pInit->ckey);
...@@ -247,7 +247,7 @@ void *rpcOpen(const SRpcInit *pInit) { ...@@ -247,7 +247,7 @@ void *rpcOpen(const SRpcInit *pInit) {
return NULL; return NULL;
} }
pRpc->idPool = taosInitIdPool(pRpc->sessions); pRpc->idPool = taosInitIdPool(pRpc->sessions-1);
if (pRpc->idPool == NULL) { if (pRpc->idPool == NULL) {
tError("%s failed to init ID pool", pRpc->label); tError("%s failed to init ID pool", pRpc->label);
rpcClose(pRpc); rpcClose(pRpc);
......
...@@ -32,6 +32,8 @@ int taosGetFqdn(char *fqdn) { ...@@ -32,6 +32,8 @@ int taosGetFqdn(char *fqdn) {
uError("failed to get host name"); uError("failed to get host name");
return -1; return -1;
} }
free(h);
} }
uint32_t taosGetIpFromFqdn(const char *fqdn) { uint32_t taosGetIpFromFqdn(const char *fqdn) {
......
...@@ -194,9 +194,10 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) { ...@@ -194,9 +194,10 @@ int32_t vnodeOpen(int32_t vnode, char *rootDir) {
pVnode->wqueue = dnodeAllocateWqueue(pVnode); pVnode->wqueue = dnodeAllocateWqueue(pVnode);
pVnode->rqueue = dnodeAllocateRqueue(pVnode); pVnode->rqueue = dnodeAllocateRqueue(pVnode);
SCqCfg cqCfg; SCqCfg cqCfg = {0};
sprintf(cqCfg.user, "root"); sprintf(cqCfg.user, "root");
strcpy(cqCfg.pass, tsInternalPass); strcpy(cqCfg.pass, tsInternalPass);
cqCfg.vgId = vnode;
cqCfg.cqWrite = vnodeWriteToQueue; cqCfg.cqWrite = vnodeWriteToQueue;
pVnode->cq = cqOpen(pVnode, &cqCfg); pVnode->cq = cqOpen(pVnode, &cqCfg);
......
...@@ -70,28 +70,14 @@ if [ "$CLEAR_OPTION" = "clear" ]; then ...@@ -70,28 +70,14 @@ if [ "$CLEAR_OPTION" = "clear" ]; then
rm -rf $MGMT_DIR rm -rf $MGMT_DIR
fi fi
if [ "$SHELL_OPTION" = "true" ]; then
if [ "$EXEC_OPTON" = "start" ]; then
echo "ExcuteCmd:" $EXE_DIR/taos -c $CFG_DIR -u $USERS -p
$EXE_DIR/taos -c $CFG_DIR -u $USERS -p
else
#relative path
RCFG_DIR=sim/$NODE_NAME/cfg
PID=`ps -ef|grep -v taosd | grep taos | grep $RCFG_DIR | grep -v grep | awk '{print $2}'`
if [ -n "$PID" ]; then
sudo kill -9 $PID
fi
fi
return
fi
if [ "$EXEC_OPTON" = "start" ]; then if [ "$EXEC_OPTON" = "start" ]; then
echo "ExcuteCmd:" $EXE_DIR/taosd -c $CFG_DIR echo "ExcuteCmd:" $EXE_DIR/taosd -c $CFG_DIR
if [ "$SHELL_OPTION" = "true" ]; then
nohup valgrind --log-file=${LOG_DIR}/valgrind.log --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 &
else
nohup $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 & nohup $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 &
#TT=`date +%s` fi
#mkdir ${LOG_DIR}/${TT}
#echo valgrind --log-file=${LOG_DIR}/${TT}/valgrind.log --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes $EXE_DIR/taosd -c $CFG_DIR
#nohup valgrind --log-file=${LOG_DIR}/${TT}/valgrind.log --tool=memcheck --leak-check=full --show-reachable=no --track-origins=yes --show-leak-kinds=all -v --workaround-gcc296-bugs=yes $EXE_DIR/taosd -c $CFG_DIR > /dev/null 2>&1 &
else else
#relative path #relative path
......
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode3 -i 3
...@@ -49,8 +44,8 @@ sql insert into d1.t1 values(now+4s, 12) ...@@ -49,8 +44,8 @@ sql insert into d1.t1 values(now+4s, 12)
sql insert into d1.t1 values(now+5s, 11) sql insert into d1.t1 values(now+5s, 11)
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
if $data3_1 != 1 then if $data2_1 != 1 then
return -1 return -1
endi endi
...@@ -68,12 +63,12 @@ show2: ...@@ -68,12 +63,12 @@ show2:
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
if $data3_1 != 0 then if $data2_1 != 0 then
goto show2 goto show2
endi endi
if $data3_2 != 1 then if $data2_2 != 1 then
goto show2 goto show2
endi endi
...@@ -87,12 +82,12 @@ sql insert into d2.t2 values(now+4s, 22) ...@@ -87,12 +82,12 @@ sql insert into d2.t2 values(now+4s, 22)
sql insert into d2.t2 values(now+5s, 21) sql insert into d2.t2 values(now+5s, 21)
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
if $data3_1 != 0 then if $data2_1 != 0 then
return -1 return -1
endi endi
if $data3_2 != 2 then if $data2_2 != 2 then
return -1 return -1
endi endi
...@@ -108,12 +103,12 @@ show4: ...@@ -108,12 +103,12 @@ show4:
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
if $data3_1 != 2 then if $data2_1 != 2 then
goto show4 goto show4
endi endi
if $data3_2 != null then if $data2_2 != null then
goto show4 goto show4
endi endi
if $rows != 1 then if $rows != 1 then
...@@ -135,16 +130,16 @@ show5: ...@@ -135,16 +130,16 @@ show5:
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
if $data3_1 != 0 then if $data2_1 != 0 then
goto show5 goto show5
endi endi
if $data3_2 != null then if $data2_2 != null then
goto show5 goto show5
endi endi
if $data3_3 != 2 then if $data2_3 != 2 then
goto show5 goto show5
endi endi
...@@ -158,17 +153,17 @@ sql insert into d3.t3 values(now+4s, 32) ...@@ -158,17 +153,17 @@ sql insert into d3.t3 values(now+4s, 32)
sql insert into d3.t3 values(now+5s, 31) sql insert into d3.t3 values(now+5s, 31)
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
if $data3_1 != 0 then if $data2_1 != 0 then
return -1 return -1
endi endi
if $data3_2 != null then if $data2_2 != null then
return -1 return -1
endi endi
if $data3_3 != 3 then if $data2_3 != 3 then
return -1 return -1
endi endi
...@@ -185,20 +180,20 @@ show7: ...@@ -185,20 +180,20 @@ show7:
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data3_4 print dnode4 openVnodes $data2_4
if $data3_1 != 0 then if $data2_1 != 0 then
goto show7 goto show7
endi endi
if $data3_2 != null then if $data2_2 != null then
goto show7 goto show7
endi endi
if $data3_3 != 2 then if $data2_3 != 2 then
goto show7 goto show7
endi endi
if $data3_4 != 1 then if $data2_4 != 1 then
goto show7 goto show7
endi endi
...@@ -212,21 +207,21 @@ sql insert into d4.t4 values(now+4s, 42) ...@@ -212,21 +207,21 @@ sql insert into d4.t4 values(now+4s, 42)
sql insert into d4.t4 values(now+5s, 41) sql insert into d4.t4 values(now+5s, 41)
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data3_4 print dnode4 openVnodes $data2_4
if $data3_1 != 0 then if $data2_1 != 0 then
return -1 return -1
endi endi
if $data3_2 != null then if $data2_2 != null then
return -1 return -1
endi endi
if $data3_3 != 2 then if $data2_3 != 2 then
return -1 return -1
endi endi
if $data3_4 != 2 then if $data2_4 != 2 then
return -1 return -1
endi endi
...@@ -242,21 +237,21 @@ show9: ...@@ -242,21 +237,21 @@ show9:
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data3_4 print dnode4 openVnodes $data2_4
if $data3_1 != 0 then if $data2_1 != 0 then
goto show9 goto show9
endi endi
if $data3_2 != null then if $data2_2 != null then
goto show9 goto show9
endi endi
if $data3_3 != null then if $data2_3 != null then
goto show9 goto show9
endi endi
if $data3_4 != 4 then if $data2_4 != 4 then
goto show9 goto show9
endi endi
......
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode4 -i 4 system sh/deploy.sh -n dnode4 -i 4
system sh/deploy.sh -n dnode5 -i 5 system sh/deploy.sh -n dnode5 -i 5
system sh/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode3 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode4 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode5 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode5 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4
...@@ -63,16 +45,16 @@ sql insert into d2.t2 values(now+4s, 22) ...@@ -63,16 +45,16 @@ sql insert into d2.t2 values(now+4s, 22)
sql insert into d2.t2 values(now+5s, 21) sql insert into d2.t2 values(now+5s, 21)
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
if $data3_1 != 4 then if $data2_1 != 0 then
return -1 return -1
endi endi
if $data3_2 != 2 then if $data2_2 != 2 then
return -1 return -1
endi endi
if $data3_3 != 2 then if $data2_3 != 2 then
return -1 return -1
endi endi
...@@ -88,16 +70,16 @@ show2: ...@@ -88,16 +70,16 @@ show2:
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
if $data3_1 != 2 then if $data2_1 != 2 then
goto show2 goto show2
endi endi
if $data3_2 != null then if $data2_2 != null then
goto show2 goto show2
endi endi
if $data3_3 != 2 then if $data2_3 != 2 then
goto show2 goto show2
endi endi
...@@ -116,20 +98,20 @@ show3: ...@@ -116,20 +98,20 @@ show3:
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data3_4 print dnode4 openVnodes $data2_4
if $data3_1 != 4 then if $data2_1 != 0 then
goto show3 goto show3
endi endi
if $data3_2 != null then if $data2_2 != null then
goto show3 goto show3
endi endi
if $data3_3 != 2 then if $data2_3 != 2 then
goto show3 goto show3
endi endi
if $data3_4 != 2 then if $data2_4 != 2 then
goto show3 goto show3
endi endi
...@@ -143,20 +125,20 @@ sql insert into d3.t3 values(now+4s, 32) ...@@ -143,20 +125,20 @@ sql insert into d3.t3 values(now+4s, 32)
sql insert into d3.t3 values(now+5s, 31) sql insert into d3.t3 values(now+5s, 31)
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data3_4 print dnode4 openVnodes $data2_4
if $data3_1 != 4 then if $data2_1 != 0 then
return -1 return -1
endi endi
if $data3_2 != null then if $data2_2 != null then
return -1 return -1
endi endi
if $data3_3 != 1 then if $data2_3 != 3 then
return -1 return -1
endi endi
if $data3_4 != 1 then if $data2_4 != 3 then
return -1 return -1
endi endi
...@@ -173,24 +155,24 @@ show5: ...@@ -173,24 +155,24 @@ show5:
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data3_4 print dnode4 openVnodes $data2_4
print dnode5 openVnodes $data3_5 print dnode5 openVnodes $data2_5
if $data3_1 != 4 then if $data2_1 != 0 then
goto show5 goto show5
endi endi
if $data3_2 != null then if $data2_2 != null then
goto show5 goto show5
endi endi
if $data3_3 != 2 then if $data2_3 != 2 then
goto show5 goto show5
endi endi
if $data3_4 != 2 then if $data2_4 != 2 then
goto show5 goto show5
endi endi
if $data3_5 != 2 then if $data2_5 != 2 then
goto show5 goto show5
endi endi
...@@ -206,28 +188,31 @@ show6: ...@@ -206,28 +188,31 @@ show6:
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data3_4 print dnode4 openVnodes $data2_4
print dnode5 openVnodes $data3_5 print dnode5 openVnodes $data2_5
if $data3_1 != 4 then if $data2_1 != 0 then
goto show6 goto show6
endi endi
if $data3_2 != null then if $data2_2 != null then
goto show6 goto show6
endi endi
if $data3_3 != null then if $data2_3 != null then
goto show6 goto show6
endi endi
if $data3_4 != 1 then if $data2_4 != 3 then
goto show6 goto show6
endi endi
if $data3_5 != 1 then if $data2_5 != 3 then
goto show6 goto show6
endi endi
system sh/exec_up.sh -n dnode3 -s stop -x SIGINT system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
sql reset query cache
sleep 1000
print ========== step7 print ========== step7
sql select * from d1.t1 order by t desc sql select * from d1.t1 order by t desc
......
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode3 -i 3
...@@ -14,20 +7,6 @@ system sh/deploy.sh -n dnode4 -i 4 ...@@ -14,20 +7,6 @@ system sh/deploy.sh -n dnode4 -i 4
system sh/deploy.sh -n dnode5 -i 5 system sh/deploy.sh -n dnode5 -i 5
system sh/deploy.sh -n dnode6 -i 6 system sh/deploy.sh -n dnode6 -i 6
system sh/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode3 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode4 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode5 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode6 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode5 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode6 -c balanceStartInterval -v 10
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4 system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4
...@@ -71,21 +50,21 @@ sql insert into d2.t2 values(now+4s, 22) ...@@ -71,21 +50,21 @@ sql insert into d2.t2 values(now+4s, 22)
sql insert into d2.t2 values(now+5s, 21) sql insert into d2.t2 values(now+5s, 21)
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data3_4 print dnode4 openVnodes $data2_4
if $data3_1 != 4 then if $data2_1 != 0 then
return -1 return -1
endi endi
if $data3_2 != 2 then if $data2_2 != 2 then
return -1 return -1
endi endi
if $data3_3 != 2 then if $data2_3 != 2 then
return -1 return -1
endi endi
if $data3_4 != 2 then if $data2_4 != 2 then
return -1 return -1
endi endi
...@@ -101,21 +80,21 @@ show2: ...@@ -101,21 +80,21 @@ show2:
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data3_4 print dnode4 openVnodes $data2_4
if $data3_1 != 2 then if $data2_1 != 2 then
goto show2 goto show2
endi endi
if $data3_2 != null then if $data2_2 != null then
goto show2 goto show2
endi endi
if $data3_3 != 2 then if $data2_3 != 2 then
goto show2 goto show2
endi endi
if $data3_4 != 2 then if $data2_4 != 2 then
goto show2 goto show2
endi endi
...@@ -134,25 +113,25 @@ show3: ...@@ -134,25 +113,25 @@ show3:
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data3_4 print dnode4 openVnodes $data2_4
print dnode5 openVnodes $data3_5 print dnode5 openVnodes $data2_5
if $data3_1 != 4 then if $data2_1 != 0 then
goto show3 goto show3
endi endi
if $data3_2 != null then if $data2_2 != null then
goto show3 goto show3
endi endi
if $data3_3 != 2 then if $data2_3 != 2 then
goto show3 goto show3
endi endi
if $data3_4 != 2 then if $data2_4 != 2 then
goto show3 goto show3
endi endi
if $data3_5 != 2 then if $data2_5 != 2 then
goto show3 goto show3
endi endi
...@@ -174,25 +153,25 @@ show4: ...@@ -174,25 +153,25 @@ show4:
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data3_4 print dnode4 openVnodes $data2_4
print dnode5 openVnodes $data3_5 print dnode5 openVnodes $data2_5
if $data3_1 != 4 then if $data2_1 != 0 then
goto show4 goto show4
endi endi
if $data3_2 != null then if $data2_2 != null then
goto show4 goto show4
endi endi
if $data3_3 != 1 then if $data2_3 != 3 then
goto show4 goto show4
endi endi
if $data3_4 != 1 then if $data2_4 != 3 then
goto show4 goto show4
endi endi
if $data3_5 != 1 then if $data2_5 != 3 then
goto show4 goto show4
endi endi
...@@ -209,16 +188,16 @@ show5: ...@@ -209,16 +188,16 @@ show5:
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data3_4 print dnode4 openVnodes $data2_4
print dnode5 openVnodes $data3_5 print dnode5 openVnodes $data2_5
if $data3_1 != 4 then if $data2_1 != 0 then
goto show5 goto show5
endi endi
if $data3_2 != 2 then if $data2_2 != 2 then
goto show5 goto show5
endi endi
...@@ -236,30 +215,33 @@ show6: ...@@ -236,30 +215,33 @@ show6:
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data3_3 print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data3_4 print dnode4 openVnodes $data2_4
print dnode5 openVnodes $data3_5 print dnode5 openVnodes $data2_5
if $data3_1 != 4 then if $data2_1 != 0 then
goto show6 goto show6
endi endi
if $data3_2 != 1 then if $data2_2 != 3 then
goto show6 goto show6
endi endi
if $data3_3 != null then if $data2_3 != null then
goto show6 goto show6
endi endi
if $data3_4 != 1 then if $data2_4 != 3 then
goto show6 goto show6
endi endi
if $data3_5 != 1 then if $data2_5 != 3 then
goto show6 goto show6
endi endi
system sh/exec_up.sh -n dnode3 -s stop -x SIGINT system sh/exec_up.sh -n dnode3 -s stop -x SIGINT
sql reset query cache
sleep 1000
print ========== step7 print ========== step7
sql select * from d1.t1 order by t desc sql select * from d1.t1 order by t desc
print $data01 $data11 $data21 $data31 $data41 print $data01 $data11 $data21 $data31 $data41
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册