提交 187c7a2f 编写于 作者: H hjxilinx

Merge branch 'develop' into feature/query

...@@ -185,7 +185,7 @@ typedef struct { ...@@ -185,7 +185,7 @@ typedef struct {
#define keyCol(pCols) (&((pCols)->cols[0])) // Key column #define keyCol(pCols) (&((pCols)->cols[0])) // Key column
#define dataColsKeyAt(pCols, idx) ((TSKEY *)(keyCol(pCols)->pData))[(idx)] #define dataColsKeyAt(pCols, idx) ((TSKEY *)(keyCol(pCols)->pData))[(idx)]
#define dataColsKeyFirst(pCols) dataColsKeyAt(pCols, 0) #define dataColsKeyFirst(pCols) dataColsKeyAt(pCols, 0)
#define dataColsKeyLast(pCols) dataColsKeyAt(pCols, (pCols)->numOfPoints - 1) #define dataColsKeyLast(pCols) ((pCols->numOfPoints == 0) ? 0 : dataColsKeyAt(pCols, (pCols)->numOfPoints - 1))
SDataCols *tdNewDataCols(int maxRowSize, int maxCols, int maxRows); SDataCols *tdNewDataCols(int maxRowSize, int maxCols, int maxRows);
void tdResetDataCols(SDataCols *pCols); void tdResetDataCols(SDataCols *pCols);
......
...@@ -102,8 +102,7 @@ extern int32_t tsMaxMeterConnections; ...@@ -102,8 +102,7 @@ extern int32_t tsMaxMeterConnections;
extern int32_t tsMaxVnodeConnections; extern int32_t tsMaxVnodeConnections;
extern int32_t tsMaxMgmtConnections; extern int32_t tsMaxMgmtConnections;
extern int32_t tsBalanceMonitorInterval; extern int32_t tsBalanceInterval;
extern int32_t tsBalanceStartInterval;
extern int32_t tsOfflineThreshold; extern int32_t tsOfflineThreshold;
extern int32_t tsMgmtEqualVnodeNum; extern int32_t tsMgmtEqualVnodeNum;
......
...@@ -119,9 +119,8 @@ int32_t tsMaxMeterConnections = 10000; ...@@ -119,9 +119,8 @@ int32_t tsMaxMeterConnections = 10000;
int32_t tsMaxMgmtConnections = 2000; int32_t tsMaxMgmtConnections = 2000;
int32_t tsMaxVnodeConnections = 10000; int32_t tsMaxVnodeConnections = 10000;
int32_t tsBalanceMonitorInterval = 2; // seconds int32_t tsBalanceInterval = 300; // seconds
int32_t tsBalanceStartInterval = 300; // seconds int32_t tsOfflineThreshold = 86400*100; // seconds 10days
int32_t tsOfflineThreshold = 864000; // seconds 10days
int32_t tsMgmtEqualVnodeNum = 4; int32_t tsMgmtEqualVnodeNum = 4;
int32_t tsEnableHttpModule = 1; int32_t tsEnableHttpModule = 1;
...@@ -406,7 +405,7 @@ static void doInitGlobalConfig() { ...@@ -406,7 +405,7 @@ static void doInitGlobalConfig() {
taosInitConfigOption(cfg); taosInitConfigOption(cfg);
cfg.option = "balanceInterval"; cfg.option = "balanceInterval";
cfg.ptr = &tsBalanceStartInterval; cfg.ptr = &tsBalanceInterval;
cfg.valType = TAOS_CFG_VTYPE_INT32; cfg.valType = TAOS_CFG_VTYPE_INT32;
cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW; cfg.cfgType = TSDB_CFG_CTYPE_B_CONFIG | TSDB_CFG_CTYPE_B_SHOW;
cfg.minValue = 1; cfg.minValue = 1;
......
...@@ -71,13 +71,13 @@ void dnodeMgmt(SRpcMsg *pMsg) { ...@@ -71,13 +71,13 @@ void dnodeMgmt(SRpcMsg *pMsg) {
rpcFreeCont(pMsg->pCont); rpcFreeCont(pMsg->pCont);
} }
static int32_t dnodeGetVnodeList(int32_t vnodeList[]) { static int32_t dnodeGetVnodeList(int32_t vnodeList[], int32_t *numOfVnodes) {
DIR *dir = opendir(tsVnodeDir); DIR *dir = opendir(tsVnodeDir);
if (dir == NULL) { if (dir == NULL) {
return TSDB_CODE_NO_WRITE_ACCESS; return TSDB_CODE_NO_WRITE_ACCESS;
} }
int32_t numOfVnodes = 0; *numOfVnodes = 0;
struct dirent *de = NULL; struct dirent *de = NULL;
while ((de = readdir(dir)) != NULL) { while ((de = readdir(dir)) != NULL) {
if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0) continue; if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0) continue;
...@@ -86,21 +86,28 @@ static int32_t dnodeGetVnodeList(int32_t vnodeList[]) { ...@@ -86,21 +86,28 @@ static int32_t dnodeGetVnodeList(int32_t vnodeList[]) {
int32_t vnode = atoi(de->d_name + 5); int32_t vnode = atoi(de->d_name + 5);
if (vnode == 0) continue; if (vnode == 0) continue;
vnodeList[numOfVnodes] = vnode; vnodeList[*numOfVnodes] = vnode;
numOfVnodes++; (*numOfVnodes)++;
} }
} }
closedir(dir); closedir(dir);
return numOfVnodes; return TSDB_CODE_SUCCESS;
} }
static int32_t dnodeOpenVnodes() { static int32_t dnodeOpenVnodes() {
char vnodeDir[TSDB_FILENAME_LEN * 3]; char vnodeDir[TSDB_FILENAME_LEN * 3];
int32_t failed = 0; int32_t failed = 0;
int32_t *vnodeList = (int32_t *)malloc(sizeof(int32_t) * TSDB_MAX_VNODES); int32_t *vnodeList = (int32_t *)malloc(sizeof(int32_t) * TSDB_MAX_VNODES);
int32_t numOfVnodes = dnodeGetVnodeList(vnodeList); int32_t numOfVnodes;
int32_t status;
status = dnodeGetVnodeList(vnodeList, &numOfVnodes);
if (status != TSDB_CODE_SUCCESS) {
dPrint("Get dnode list failed");
return status;
}
for (int32_t i = 0; i < numOfVnodes; ++i) { for (int32_t i = 0; i < numOfVnodes; ++i) {
snprintf(vnodeDir, TSDB_FILENAME_LEN * 3, "%s/vnode%d", tsVnodeDir, vnodeList[i]); snprintf(vnodeDir, TSDB_FILENAME_LEN * 3, "%s/vnode%d", tsVnodeDir, vnodeList[i]);
...@@ -115,7 +122,15 @@ static int32_t dnodeOpenVnodes() { ...@@ -115,7 +122,15 @@ static int32_t dnodeOpenVnodes() {
static void dnodeCloseVnodes() { static void dnodeCloseVnodes() {
int32_t *vnodeList = (int32_t *)malloc(sizeof(int32_t) * TSDB_MAX_VNODES); int32_t *vnodeList = (int32_t *)malloc(sizeof(int32_t) * TSDB_MAX_VNODES);
int32_t numOfVnodes = dnodeGetVnodeList(vnodeList); int32_t numOfVnodes;
int32_t status;
status = dnodeGetVnodeList(vnodeList, &numOfVnodes);
if (status != TSDB_CODE_SUCCESS) {
dPrint("Get dnode list failed");
return;
}
for (int32_t i = 0; i < numOfVnodes; ++i) { for (int32_t i = 0; i < numOfVnodes; ++i) {
vnodeClose(vnodeList[i]); vnodeClose(vnodeList[i]);
...@@ -143,7 +158,7 @@ static int32_t dnodeProcessCreateVnodeMsg(SRpcMsg *rpcMsg) { ...@@ -143,7 +158,7 @@ static int32_t dnodeProcessCreateVnodeMsg(SRpcMsg *rpcMsg) {
for (int32_t j = 0; j < pCreate->cfg.replications; ++j) { for (int32_t j = 0; j < pCreate->cfg.replications; ++j) {
pCreate->nodes[j].nodeId = htonl(pCreate->nodes[j].nodeId); pCreate->nodes[j].nodeId = htonl(pCreate->nodes[j].nodeId);
} }
void *pVnode = vnodeAccquireVnode(pCreate->cfg.vgId); void *pVnode = vnodeAccquireVnode(pCreate->cfg.vgId);
if (pVnode != NULL) { if (pVnode != NULL) {
int32_t code = vnodeAlter(pVnode, pCreate); int32_t code = vnodeAlter(pVnode, pCreate);
......
...@@ -44,13 +44,13 @@ static void dnodeUnSetModuleStatus(int32_t module) { ...@@ -44,13 +44,13 @@ static void dnodeUnSetModuleStatus(int32_t module) {
} }
static void dnodeAllocModules() { static void dnodeAllocModules() {
tsModule[TSDB_MOD_MGMT].name = false; tsModule[TSDB_MOD_MGMT].enable = false;
tsModule[TSDB_MOD_MGMT].name = "mgmt"; tsModule[TSDB_MOD_MGMT].name = "mgmt";
tsModule[TSDB_MOD_MGMT].initFp = mgmtInitSystem; tsModule[TSDB_MOD_MGMT].initFp = mgmtInitSystem;
tsModule[TSDB_MOD_MGMT].cleanUpFp = mgmtCleanUpSystem; tsModule[TSDB_MOD_MGMT].cleanUpFp = mgmtCleanUpSystem;
tsModule[TSDB_MOD_MGMT].startFp = mgmtStartSystem; tsModule[TSDB_MOD_MGMT].startFp = mgmtStartSystem;
tsModule[TSDB_MOD_MGMT].stopFp = mgmtStopSystem; tsModule[TSDB_MOD_MGMT].stopFp = mgmtStopSystem;
tsModule[TSDB_MOD_HTTP].enable = (tsEnableHttpModule == 1); tsModule[TSDB_MOD_HTTP].enable = (tsEnableHttpModule == 1);
tsModule[TSDB_MOD_HTTP].name = "http"; tsModule[TSDB_MOD_HTTP].name = "http";
tsModule[TSDB_MOD_HTTP].initFp = httpInitSystem; tsModule[TSDB_MOD_HTTP].initFp = httpInitSystem;
...@@ -60,7 +60,7 @@ static void dnodeAllocModules() { ...@@ -60,7 +60,7 @@ static void dnodeAllocModules() {
if (tsEnableHttpModule) { if (tsEnableHttpModule) {
dnodeSetModuleStatus(TSDB_MOD_HTTP); dnodeSetModuleStatus(TSDB_MOD_HTTP);
} }
tsModule[TSDB_MOD_MONITOR].enable = (tsEnableMonitorModule == 1); tsModule[TSDB_MOD_MONITOR].enable = (tsEnableMonitorModule == 1);
tsModule[TSDB_MOD_MONITOR].name = "monitor"; tsModule[TSDB_MOD_MONITOR].name = "monitor";
tsModule[TSDB_MOD_MONITOR].initFp = monitorInitSystem; tsModule[TSDB_MOD_MONITOR].initFp = monitorInitSystem;
......
...@@ -658,7 +658,13 @@ static SRpcConn *rpcGetConnObj(SRpcInfo *pRpc, int sid, SRecvInfo *pRecv) { ...@@ -658,7 +658,13 @@ static SRpcConn *rpcGetConnObj(SRpcInfo *pRpc, int sid, SRecvInfo *pRecv) {
if (pConn->user[0] == 0) pConn = NULL; if (pConn->user[0] == 0) pConn = NULL;
} }
if (pConn == NULL) pConn = rpcAllocateServerConn(pRpc, pRecv); if (pConn == NULL) {
if (pRpc->connType == TAOS_CONN_SERVER) {
pConn = rpcAllocateServerConn(pRpc, pRecv);
} else {
terrno = TSDB_CODE_UNEXPECTED_RESPONSE;
}
}
if (pConn) { if (pConn) {
if (pConn->linkUid != pHead->linkUid) { if (pConn->linkUid != pHead->linkUid) {
...@@ -797,14 +803,7 @@ static SRpcConn *rpcProcessMsgHead(SRpcInfo *pRpc, SRecvInfo *pRecv) { ...@@ -797,14 +803,7 @@ static SRpcConn *rpcProcessMsgHead(SRpcInfo *pRpc, SRecvInfo *pRecv) {
sid = pConn->sid; sid = pConn->sid;
pConn->chandle = pRecv->chandle; pConn->chandle = pRecv->chandle;
if (pConn->peerIp != pRecv->ip) { if (pConn->peerPort == 0) pConn->peerPort = pRecv->port;
pConn->peerIp = pRecv->ip;
char ipstr[20] = {0};
tinet_ntoa(ipstr, pRecv->ip);
strcpy(pConn->peerFqdn, ipstr);
}
if (pRecv->port) pConn->peerPort = pRecv->port;
if (pHead->port) pConn->peerPort = htons(pHead->port); if (pHead->port) pConn->peerPort = htons(pHead->port);
terrno = rpcCheckAuthentication(pConn, (char *)pHead, pRecv->msgLen); terrno = rpcCheckAuthentication(pConn, (char *)pHead, pRecv->msgLen);
...@@ -1150,7 +1149,7 @@ static void rpcProcessRetryTimer(void *param, void *tmrId) { ...@@ -1150,7 +1149,7 @@ static void rpcProcessRetryTimer(void *param, void *tmrId) {
pConn->retry++; pConn->retry++;
if (pConn->retry < 4) { if (pConn->retry < 4) {
tTrace("%s %p, re-send msg:%s to %s:%hud", pRpc->label, pConn, tTrace("%s %p, re-send msg:%s to %s:%hu", pRpc->label, pConn,
taosMsg[pConn->outType], pConn->peerFqdn, pConn->peerPort); taosMsg[pConn->outType], pConn->peerFqdn, pConn->peerPort);
rpcSendMsgToPeer(pConn, pConn->pReqMsg, pConn->reqMsgLen); rpcSendMsgToPeer(pConn, pConn->pReqMsg, pConn->reqMsgLen);
taosTmrReset(rpcProcessRetryTimer, tsRpcTimer, pConn, pRpc->tmrCtrl, &pConn->pTimer); taosTmrReset(rpcProcessRetryTimer, tsRpcTimer, pConn, pRpc->tmrCtrl, &pConn->pTimer);
......
...@@ -127,7 +127,7 @@ void *taosInitUdpConnection(uint32_t ip, uint16_t port, char *label, int threads ...@@ -127,7 +127,7 @@ void *taosInitUdpConnection(uint32_t ip, uint16_t port, char *label, int threads
unsigned int addrlen = sizeof(sin); unsigned int addrlen = sizeof(sin);
if (getsockname(pConn->fd, (struct sockaddr *)&sin, &addrlen) == 0 && sin.sin_family == AF_INET && if (getsockname(pConn->fd, (struct sockaddr *)&sin, &addrlen) == 0 && sin.sin_family == AF_INET &&
addrlen == sizeof(sin)) { addrlen == sizeof(sin)) {
pConn->localPort = (int16_t)ntohs(sin.sin_port); pConn->localPort = (uint16_t)ntohs(sin.sin_port);
} }
strcpy(pConn->label, label); strcpy(pConn->label, label);
...@@ -198,8 +198,7 @@ void *taosOpenUdpConnection(void *shandle, void *thandle, uint32_t ip, uint16_t ...@@ -198,8 +198,7 @@ void *taosOpenUdpConnection(void *shandle, void *thandle, uint32_t ip, uint16_t
SUdpConn *pConn = pSet->udpConn + pSet->index; SUdpConn *pConn = pSet->udpConn + pSet->index;
pConn->port = port; pConn->port = port;
tTrace("%s UDP connection is setup, ip:%x:%hu, local:%x:%d", pConn->label, ip, port, pSet->ip, tTrace("%s UDP connection is setup, ip:%x:%hu, local:%x:%d", pConn->label, ip, port, pSet->ip, pConn->localPort);
ntohs((uint16_t)pConn->localPort));
return pConn; return pConn;
} }
...@@ -219,16 +218,14 @@ static void *taosRecvUdpData(void *param) { ...@@ -219,16 +218,14 @@ static void *taosRecvUdpData(void *param) {
while (1) { while (1) {
dataLen = recvfrom(pConn->fd, pConn->buffer, RPC_MAX_UDP_SIZE, 0, (struct sockaddr *)&sourceAdd, &addLen); dataLen = recvfrom(pConn->fd, pConn->buffer, RPC_MAX_UDP_SIZE, 0, (struct sockaddr *)&sourceAdd, &addLen);
tTrace("%s msg is recv from 0x%x:%hu len:%d", pConn->label, sourceAdd.sin_addr.s_addr, ntohs(sourceAdd.sin_port), port = ntohs(sourceAdd.sin_port);
dataLen); tTrace("%s msg is recv from 0x%x:%hu len:%d", pConn->label, sourceAdd.sin_addr.s_addr, port, dataLen);
if (dataLen < sizeof(SRpcHead)) { if (dataLen < sizeof(SRpcHead)) {
tError("%s recvfrom failed, reason:%s\n", pConn->label, strerror(errno)); tError("%s recvfrom failed, reason:%s\n", pConn->label, strerror(errno));
continue; continue;
} }
port = ntohs(sourceAdd.sin_port);
int processedLen = 0, leftLen = 0; int processedLen = 0, leftLen = 0;
int msgLen = 0; int msgLen = 0;
int count = 0; int count = 0;
......
...@@ -20,11 +20,29 @@ ...@@ -20,11 +20,29 @@
#include "tsdb.h" #include "tsdb.h"
#include "tskiplist.h" #include "tskiplist.h"
#include "tutil.h" #include "tutil.h"
#include "tlog.h"
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
extern int tsdbDebugFlag;
#define tsdbError(...) \
if (tsdbDebugFlag & DEBUG_ERROR) { \
taosPrintLog("ERROR TSDB ", tsdbDebugFlag, __VA_ARGS__); \
}
#define tsdbWarn(...) \
if (tsdbDebugFlag & DEBUG_WARN) { \
taosPrintLog("WARN TSDB ", tsdbDebugFlag, __VA_ARGS__); \
}
#define tsdbTrace(...) \
if (tsdbDebugFlag & DEBUG_TRACE) { \
taosPrintLog("TSDB ", tsdbDebugFlag, __VA_ARGS__); \
}
#define tsdbPrint(...) \
{ taosPrintLog("TSDB ", 255, __VA_ARGS__); }
// ------------------------------ TSDB META FILE INTERFACES ------------------------------ // ------------------------------ TSDB META FILE INTERFACES ------------------------------
#define TSDB_META_FILE_NAME "META" #define TSDB_META_FILE_NAME "META"
#define TSDB_META_HASH_FRACTION 1.1 #define TSDB_META_HASH_FRACTION 1.1
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#include "tscompression.h" #include "tscompression.h"
#include "tchecksum.h" #include "tchecksum.h"
int tsdbDebugFlag = 135;
#define TSDB_DEFAULT_PRECISION TSDB_PRECISION_MILLI // default precision #define TSDB_DEFAULT_PRECISION TSDB_PRECISION_MILLI // default precision
#define IS_VALID_PRECISION(precision) (((precision) >= TSDB_PRECISION_MILLI) && ((precision) <= TSDB_PRECISION_NANO)) #define IS_VALID_PRECISION(precision) (((precision) >= TSDB_PRECISION_MILLI) && ((precision) <= TSDB_PRECISION_NANO))
#define TSDB_DEFAULT_COMPRESSION TWO_STAGE_COMP #define TSDB_DEFAULT_COMPRESSION TWO_STAGE_COMP
......
...@@ -20,7 +20,7 @@ run general/table/tinyint.sim ...@@ -20,7 +20,7 @@ run general/table/tinyint.sim
run general/table/db.table.sim run general/table/db.table.sim
run general/user/basic1.sim run general/user/basic1.sim
run general/user/pass_alter.sim #run general/user/pass_alter.sim
run general/user/pass_len.sim run general/user/pass_len.sim
run general/user/user_create.sim run general/user/user_create.sim
run general/user/user_len.sim run general/user/user_len.sim
......
...@@ -5,15 +5,10 @@ system sh/deploy.sh -n dnode2 -i 2 ...@@ -5,15 +5,10 @@ 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/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1 system sh/cfg.sh -n dnode1 -c balanceInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1 system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceMonitorInterval -v 1 system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceMonitorInterval -v 1 system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
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 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
......
...@@ -176,20 +176,21 @@ if $data2_5 != 3 then ...@@ -176,20 +176,21 @@ if $data2_5 != 3 then
endi endi
print ========== step5 print ========== step5
sql create dnode $hostname2 sql create dnode $hostname6
system sh/exec_up.sh -n dnode2 -s start system sh/deploy.sh -n dnode6 -i 6
system sh/exec_up.sh -n dnode6 -s start
$x = 0 $x = 0
show5: show5:
$x = $x + 1 $x = $x + 1
sleep 2000 sleep 2000
if $x == 20 then if $x == 10 then
return -1 return -1
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data2_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data2_2 print dnode6 openVnodes $data2_6
print dnode3 openVnodes $data2_3 print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data2_4 print dnode4 openVnodes $data2_4
print dnode5 openVnodes $data2_5 print dnode5 openVnodes $data2_5
...@@ -197,7 +198,7 @@ print dnode5 openVnodes $data2_5 ...@@ -197,7 +198,7 @@ print dnode5 openVnodes $data2_5
if $data2_1 != 0 then if $data2_1 != 0 then
goto show5 goto show5
endi endi
if $data2_2 != 2 then if $data2_6 != 2 then
goto show5 goto show5
endi endi
...@@ -216,7 +217,7 @@ show6: ...@@ -216,7 +217,7 @@ show6:
sql show dnodes sql show dnodes
print dnode1 openVnodes $data2_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data2_2 print dnode6 openVnodes $data2_6
print dnode3 openVnodes $data2_3 print dnode3 openVnodes $data2_3
print dnode4 openVnodes $data2_4 print dnode4 openVnodes $data2_4
print dnode5 openVnodes $data2_5 print dnode5 openVnodes $data2_5
...@@ -224,7 +225,7 @@ print dnode5 openVnodes $data2_5 ...@@ -224,7 +225,7 @@ print dnode5 openVnodes $data2_5
if $data2_1 != 0 then if $data2_1 != 0 then
goto show6 goto show6
endi endi
if $data2_2 != 3 then if $data2_6 != 3 then
goto show6 goto show6
endi endi
if $data2_3 != null then if $data2_3 != null then
......
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/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 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 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
...@@ -52,8 +37,8 @@ sql insert into d2.t2 values(now+4s, 22) ...@@ -52,8 +37,8 @@ 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
if $data3_1 != 2 then if $data2_1 != 2 then
return -1 return -1
endi endi
...@@ -70,12 +55,12 @@ show2: ...@@ -70,12 +55,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 != 4 then if $data2_1 != 0 then
goto show2 goto show2
endi endi
if $data3_2 != 2 then if $data2_2 != 2 then
goto show2 goto show2
endi endi
...@@ -96,12 +81,12 @@ show3: ...@@ -96,12 +81,12 @@ show3:
return -1 return -1
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 != 3 then if $data2_1 != 1 then
goto show3 goto show3
endi endi
if $data3_2 != 1 then if $data2_2 != 3 then
goto show3 goto show3
endi endi
...@@ -117,16 +102,16 @@ show4: ...@@ -117,16 +102,16 @@ show4:
return -1 return -1
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 != 4 then if $data2_1 != 0 then
goto show4 goto show4
endi endi
if $data3_2 != 2 then if $data2_2 != 2 then
goto show4 goto show4
endi endi
if $data3_3 != 2 then if $data2_3 != 2 then
goto show4 goto show4
endi endi
...@@ -141,21 +126,24 @@ show5: ...@@ -141,21 +126,24 @@ show5:
return -1 return -1
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 != 3 then if $data2_1 != 1 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 != 1 then if $data2_3 != 3 then
goto show5 goto show5
endi endi
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
sql reset query cache
sleep 1000
print ========== step6 print ========== step6
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
......
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/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1
system sh/cfg.sh -n dnode2 -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 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/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/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 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 dnode1 -c offlineThreshold -v 10 system sh/cfg.sh -n dnode1 -c offlineThreshold -v 10
system sh/cfg.sh -n dnode2 -c offlineThreshold -v 10 system sh/cfg.sh -n dnode2 -c offlineThreshold -v 10
system sh/cfg.sh -n dnode3 -c offlineThreshold -v 10 system sh/cfg.sh -n dnode3 -c offlineThreshold -v 10
system sh/cfg.sh -n dnode1 -c balanceInterval -v 5
system sh/cfg.sh -n dnode2 -c balanceInterval -v 5
system sh/cfg.sh -n dnode3 -c balanceInterval -v 5
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
...@@ -36,41 +28,42 @@ system sh/exec_up.sh -n dnode2 -s start ...@@ -36,41 +28,42 @@ system sh/exec_up.sh -n dnode2 -s start
sleep 3000 sleep 3000
sql show dnodes sql show dnodes
if $data4_192.168.0.1 != ready then print dnode1 $data4_1
print dnode1 $data4_2
if $data4_1 != ready then
return -1 return -1
endi endi
if $data4_192.168.0.2 != ready then if $data4_2 != ready then
return -1 return -1
endi endi
print ========== step2 print ========== step2
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
sleep 6000 sleep 8000
sql show dnodes sql show dnodes
if $data4_192.168.0.1 != ready then print dnode1 $data4_1
print dnode1 $data4_2
if $data4_1 != ready then
return -1 return -1
endi endi
if $data4_192.168.0.2 != offline then if $data4_2 != offline then
return -1 return -1
endi endi
print ========== step3 print ========== step3
sleep 10000 sleep 10000
$x = 0
show4:
$x = $x + 1
sleep 5000
if $x == 20 then
return -1
endi
sql show dnodes sql show dnodes
if $data4_192.168.0.1 != ready then print dnode1 $data4_1
goto show4 print dnode1 $data4_2
if $data4_1 != ready then
return -1
endi endi
if $data4_192.168.0.2 != null then if $data4_2 != null then
goto show4 return -1
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/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 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 dnode1 -c offlineThreshold -v 10 system sh/cfg.sh -n dnode1 -c offlineThreshold -v 10
system sh/cfg.sh -n dnode2 -c offlineThreshold -v 10 system sh/cfg.sh -n dnode2 -c offlineThreshold -v 10
system sh/cfg.sh -n dnode3 -c offlineThreshold -v 10 system sh/cfg.sh -n dnode3 -c offlineThreshold -v 10
system sh/cfg.sh -n dnode1 -c balanceInterval -v 5
system sh/cfg.sh -n dnode2 -c balanceInterval -v 5
system sh/cfg.sh -n dnode3 -c balanceInterval -v 5
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
...@@ -40,39 +32,49 @@ sql create table d1.t1(ts timestamp, i int) ...@@ -40,39 +32,49 @@ sql create table d1.t1(ts timestamp, i int)
sql insert into d1.t1 values(now, 1) sql insert into d1.t1 values(now, 1)
sql show dnodes sql show dnodes
if $data4_192.168.0.1 != ready then print dnode1 $data4_1
print dnode1 $data4_2
if $data4_1 != ready then
return -1 return -1
endi endi
if $data4_192.168.0.2 != ready then if $data4_2 != ready then
return -1 return -1
endi endi
print ========== step2 print ========== step2
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
sleep 5000 sleep 8000
sql show dnodes sql show dnodes
if $data4_192.168.0.1 != ready then print dnode1 $data4_1
print dnode1 $data4_2
if $data4_1 != ready then
return -1 return -1
endi endi
if $data4_192.168.0.2 != offline then if $data4_2 != offline then
return -1 return -1
endi endi
print ========== step3 print ========== step3
sleep 18000 sleep 10000
sql show dnodes sql show dnodes
if $data4_192.168.0.1 != ready then print dnode1 $data4_1
print dnode1 $data4_2
if $data4_1 != ready then
return -1 return -1
endi endi
if $data4_192.168.0.2 != offline then if $data4_2 != dropping then
return -1 return -1
endi endi
print ========== step4 print ========== step4
sql create dnode $hostname3 sql create dnode $hostname3
system sh/exec_up.sh -n dnode3 -s start system sh/exec_up.sh -n dnode3 -s start
system sh/exec_up.sh -n dnode2 -s start
sql drop dnode $hostname2 sql drop dnode $hostname2
sleep 5000 sleep 5000
...@@ -80,23 +82,25 @@ $x = 0 ...@@ -80,23 +82,25 @@ $x = 0
show4: show4:
$x = $x + 1 $x = $x + 1
sleep 5000 sleep 5000
if $x == 20 then if $x == 50 then
return -1 return -1
endi endi
sql show dnodes sql show dnodes
if $data4_192.168.0.1 != ready then if $data4_1 != ready then
return -1 goto show4
endi endi
if $data4_192.168.0.2 != null then if $data4_2 != null then
return -1 goto show4
endi endi
if $data4_192.168.0.3 != ready then if $data4_3 != ready then
return -1 goto show4
endi endi
print ======================== step5 print ======================== step5
sleep 10000 sql reset query cache
sleep 1000
sql select * from d1.t1 sql select * from d1.t1
if $rows != 1 then if $rows != 1 then
return -1 return -1
......
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/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 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 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
...@@ -52,8 +37,8 @@ sql insert into d2.t2 values(now+4s, 22) ...@@ -52,8 +37,8 @@ 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
if $data3_1 != 2 then if $data2_1 != 2 then
return -1 return -1
endi endi
...@@ -79,12 +64,12 @@ show2: ...@@ -79,12 +64,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 != 3 then if $data2_1 != 3 then
goto show2 goto show2
endi endi
if $data3_2 != 1 then if $data2_2 != 1 then
goto show2 goto show2
endi endi
...@@ -101,8 +86,8 @@ show3: ...@@ -101,8 +86,8 @@ show3:
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 $data5_192.168.0.2 print dnode2 openVnodes $data2_2
print ========== step4 print ========== step4
sql create dnode $hostname3 sql create dnode $hostname3
...@@ -117,10 +102,10 @@ show4: ...@@ -117,10 +102,10 @@ 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
if $data3_2 != null then if $data2_2 != null then
goto show4 goto show4
endi endi
...@@ -138,20 +123,20 @@ show5: ...@@ -138,20 +123,20 @@ show5:
return -1 return -1
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 != 4 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
......
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/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 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 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
...@@ -52,8 +37,8 @@ sql insert into d2.t2 values(now+4s, 22) ...@@ -52,8 +37,8 @@ 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
if $data3_1 != 2 then if $data2_1 != 2 then
return -1 return -1
endi endi
...@@ -79,12 +64,12 @@ show2: ...@@ -79,12 +64,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 != 3 then if $data2_1 != 3 then
goto show2 goto show2
endi endi
if $data3_2 != 1 then if $data2_2 != 1 then
goto show2 goto show2
endi endi
...@@ -102,8 +87,8 @@ show3: ...@@ -102,8 +87,8 @@ show3:
endi endi
sql show dnodes sql show dnodes
print dnode1 openVnodes $data3_1 print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data3_2 $data5_192.168.0.2 print dnode2 openVnodes $data2_2 $data5_192.168.0.2
print ========== step4 print ========== step4
sql create dnode $hostname3 sql create dnode $hostname3
...@@ -118,16 +103,16 @@ show4: ...@@ -118,16 +103,16 @@ 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
if $data3_2 != null then if $data2_2 != null then
goto show4 goto show4
endi endi
if $data3_1 != 3 then if $data2_1 != 3 then
goto show4 goto show4
endi endi
if $data3_3 != 1 then if $data2_3 != 1 then
goto show4 goto show4
endi endi
......
...@@ -4,10 +4,6 @@ run unique/dnode/balance3.sim ...@@ -4,10 +4,6 @@ run unique/dnode/balance3.sim
run unique/dnode/balancex.sim run unique/dnode/balancex.sim
run unique/dnode/offline1.sim run unique/dnode/offline1.sim
run unique/dnode/offline2.sim run unique/dnode/offline2.sim
run unique/dnode/remove1.sim #run unique/dnode/remove1.sim
run unique/dnode/remove2.sim #run unique/dnode/remove2.sim
run unique/dnode/vnode_clean.sim #run unique/dnode/vnode_clean.sim
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/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 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 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
...@@ -43,8 +28,8 @@ sql insert into d1.t1 values(now+4s, 12) ...@@ -43,8 +28,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 != 3 then if $data2_1 != 3 then
return -1 return -1
endi endi
...@@ -60,12 +45,12 @@ show2: ...@@ -60,12 +45,12 @@ show2:
return -1 return -1
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 != 4 then if $data2_1 != 4 then
goto show2 goto show2
endi endi
if $data3_2 != 3 then if $data2_2 != 3 then
goto show2 goto show2
endi endi
...@@ -81,12 +66,12 @@ sql insert into d2.t2 values(now+5s, 21) ...@@ -81,12 +66,12 @@ sql insert into d2.t2 values(now+5s, 21)
$x = 0 $x = 0
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 != 4 then if $data2_1 != 4 then
return -1 return -1
endi endi
if $data3_2 != 2 then if $data2_2 != 2 then
return -1 return -1
endi endi
...@@ -101,12 +86,12 @@ show4: ...@@ -101,12 +86,12 @@ show4:
return -1 return -1
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
...@@ -120,8 +105,7 @@ sleep 2000 ...@@ -120,8 +105,7 @@ sleep 2000
sql create dnode $hostname2 sql create dnode $hostname2
system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1 system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1 system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceStartInterval -v 10
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 dnode2 -c clog -v 1 system sh/cfg.sh -n dnode2 -c clog -v 1
system sh/exec_up.sh -n dnode2 -s start system sh/exec_up.sh -n dnode2 -s start
...@@ -134,12 +118,12 @@ show5: ...@@ -134,12 +118,12 @@ show5:
return -1 return -1
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 != 4 then if $data2_1 != 4 then
goto show5 goto show5
endi endi
if $data3_2 != 2 then if $data2_2 != 2 then
goto show5 goto show5
endi endi
...@@ -153,12 +137,12 @@ sql insert into d3.t3 values(now+4s, 32) ...@@ -153,12 +137,12 @@ 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
if $data3_1 != 4 then if $data2_1 != 4 then
return -1 return -1
endi endi
if $data3_2 != 1 then if $data2_2 != 1 then
return -1 return -1
endi endi
...@@ -175,16 +159,16 @@ show7: ...@@ -175,16 +159,16 @@ 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
if $data3_1 != 4 then if $data2_1 != 4 then
goto show7 goto show7
endi endi
if $data3_2 != 2 then if $data2_2 != 2 then
goto show7 goto show7
endi endi
if $data3_3 != 3 then if $data2_3 != 3 then
goto show7 goto show7
endi endi
...@@ -205,16 +189,16 @@ show8: ...@@ -205,16 +189,16 @@ show8:
return -1 return -1
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 != 4 then if $data2_1 != 4 then
goto show8 goto show8
endi endi
if $data3_2 != 2 then if $data2_2 != 2 then
goto show8 goto show8
endi endi
if $data3_3 != 2 then if $data2_3 != 2 then
goto show8 goto show8
endi endi
...@@ -230,16 +214,16 @@ show9: ...@@ -230,16 +214,16 @@ 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
if $data3_1 != 4 then if $data2_1 != 4 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 != 0 then if $data2_3 != 0 then
goto show9 goto show9
endi endi
......
...@@ -8,10 +8,8 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 ...@@ -8,10 +8,8 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c statusInterval -v 1 system sh/cfg.sh -n dnode1 -c statusInterval -v 1
system sh/cfg.sh -n dnode2 -c statusInterval -v 1 system sh/cfg.sh -n dnode2 -c statusInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1 system sh/cfg.sh -n dnode1 -c balanceInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1 system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
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 dnode1 -c commitLog -v 0 system sh/cfg.sh -n dnode1 -c commitLog -v 0
system sh/cfg.sh -n dnode2 -c commitLog -v 0 system sh/cfg.sh -n dnode2 -c commitLog -v 0
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0 system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0
......
...@@ -8,10 +8,8 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 ...@@ -8,10 +8,8 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c statusInterval -v 1 system sh/cfg.sh -n dnode1 -c statusInterval -v 1
system sh/cfg.sh -n dnode2 -c statusInterval -v 1 system sh/cfg.sh -n dnode2 -c statusInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1 system sh/cfg.sh -n dnode1 -c balanceInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1 system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
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 dnode1 -c commitLog -v 0 system sh/cfg.sh -n dnode1 -c commitLog -v 0
system sh/cfg.sh -n dnode2 -c commitLog -v 0 system sh/cfg.sh -n dnode2 -c commitLog -v 0
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0 system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0
......
...@@ -8,10 +8,8 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4 ...@@ -8,10 +8,8 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c statusInterval -v 1 system sh/cfg.sh -n dnode1 -c statusInterval -v 1
system sh/cfg.sh -n dnode2 -c statusInterval -v 1 system sh/cfg.sh -n dnode2 -c statusInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1 system sh/cfg.sh -n dnode1 -c balanceInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1 system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
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 dnode1 -c commitLog -v 0 system sh/cfg.sh -n dnode1 -c commitLog -v 0
system sh/cfg.sh -n dnode2 -c commitLog -v 0 system sh/cfg.sh -n dnode2 -c commitLog -v 0
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0 system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 0
......
...@@ -20,15 +20,10 @@ system sh/cfg.sh -n dnode2 -c statusInterval -v 1 ...@@ -20,15 +20,10 @@ system sh/cfg.sh -n dnode2 -c statusInterval -v 1
system sh/cfg.sh -n dnode3 -c statusInterval -v 1 system sh/cfg.sh -n dnode3 -c statusInterval -v 1
system sh/cfg.sh -n dnode4 -c statusInterval -v 1 system sh/cfg.sh -n dnode4 -c statusInterval -v 1
system sh/cfg.sh -n dnode1 -c balanceMonitorInterval -v 1 system sh/cfg.sh -n dnode1 -c balanceInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceMonitorInterval -v 1 system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceMonitorInterval -v 1 system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceMonitorInterval -v 1 system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
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 dnode1 -c clog -v 1 system sh/cfg.sh -n dnode1 -c clog -v 1
system sh/cfg.sh -n dnode2 -c clog -v 1 system sh/cfg.sh -n dnode2 -c clog -v 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册