Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
王长生-AnH
TDengine
提交
0cd94b9b
T
TDengine
项目概览
王长生-AnH
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
0cd94b9b
编写于
7月 22, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
7月 22, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2744 from taosdata/feature/vnode
Feature/vnode
上级
271353f0
8b1451b3
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
184 addition
and
74 deletion
+184
-74
src/client/src/tscSQLParser.c
src/client/src/tscSQLParser.c
+30
-14
src/common/inc/tglobal.h
src/common/inc/tglobal.h
+1
-0
src/common/src/tglobal.c
src/common/src/tglobal.c
+40
-1
src/inc/taoserror.h
src/inc/taoserror.h
+1
-0
src/inc/tbalance.h
src/inc/tbalance.h
+1
-0
src/mnode/src/mnodeBalance.c
src/mnode/src/mnodeBalance.c
+1
-0
src/mnode/src/mnodeDnode.c
src/mnode/src/mnodeDnode.c
+27
-27
src/plugins/monitor/src/monitorMain.c
src/plugins/monitor/src/monitorMain.c
+11
-32
tests/script/general/alter/dnode.sim
tests/script/general/alter/dnode.sim
+71
-0
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+1
-0
未找到文件。
src/client/src/tscSQLParser.c
浏览文件 @
0cd94b9b
...
...
@@ -358,7 +358,7 @@ int32_t tscToSQLCmd(SSqlObj* pSql, struct SSqlInfo* pInfo) {
}
case
TSDB_SQL_CFG_DNODE
:
{
const
char
*
msg2
=
"invalid configure options or values"
;
const
char
*
msg2
=
"invalid configure options or values
, such as resetlog / debugFlag 135 / balance 'vnode:1-dnode:2' / monitor 1
"
;
const
char
*
msg3
=
"invalid dnode ep"
;
/* validate the ip address */
...
...
@@ -4674,26 +4674,42 @@ int32_t validateDNodeConfig(tDCLSQL* pOptions) {
return
TSDB_CODE_TSC_INVALID_SQL
;
}
const
int
DNODE_DYNAMIC_CFG_OPTIONS_SIZE
=
19
;
const
SDNodeDynConfOption
DNODE_DYNAMIC_CFG_OPTIONS
[]
=
{
{
"resetLog"
,
8
},
{
"resetQueryCache"
,
15
},
{
"debugFlag"
,
9
},
{
"mDebugFlag"
,
10
},
{
"dDebugFlag"
,
10
},
{
"sdbDebugFlag"
,
12
},
{
"vDebugFlag"
,
10
},
{
"cDebugFlag"
,
10
},
{
"httpDebugFlag"
,
13
},
{
"monitorDebugFlag"
,
16
},
{
"rpcDebugFlag"
,
12
},
{
"uDebugFlag"
,
10
},
{
"tmrDebugFlag"
,
12
},
{
"qDebugflag"
,
10
},
{
"sDebugflag"
,
10
},
{
"tsdbDebugFlag"
,
13
},
{
"mqttDebugFlag"
,
13
},
{
"wDebugFlag"
,
10
},
{
"monitor"
,
7
}};
const
int
tokenLogEnd
=
2
;
const
int
tokenBalance
=
2
;
const
int
tokenMonitor
=
3
;
const
int
tokenDebugFlag
=
4
;
const
int
tokenDebugFlagEnd
=
20
;
const
SDNodeDynConfOption
cfgOptions
[]
=
{
{
"resetLog"
,
8
},
{
"resetQueryCache"
,
15
},
{
"balance"
,
7
},
{
"monitor"
,
7
},
{
"debugFlag"
,
9
},
{
"monitorDebugFlag"
,
16
},
{
"vDebugFlag"
,
10
},
{
"mDebugFlag"
,
10
},
{
"cDebugFlag"
,
10
},
{
"httpDebugFlag"
,
13
},
{
"qDebugflag"
,
10
},
{
"sdbDebugFlag"
,
12
},
{
"uDebugFlag"
,
10
},
{
"tsdbDebugFlag"
,
13
},
{
"sDebugflag"
,
10
},
{
"rpcDebugFlag"
,
12
},
{
"dDebugFlag"
,
10
},
{
"mqttDebugFlag"
,
13
},
{
"wDebugFlag"
,
10
},
{
"tmrDebugFlag"
,
12
},
};
SSQLToken
*
pOptionToken
=
&
pOptions
->
a
[
1
];
if
(
pOptions
->
nTokens
==
2
)
{
// reset log and reset query cache does not need value
for
(
int32_t
i
=
0
;
i
<
2
;
++
i
)
{
const
SDNodeDynConfOption
*
pOption
=
&
DNODE_DYNAMIC_CFG_OPTIONS
[
i
];
for
(
int32_t
i
=
0
;
i
<
tokenLogEnd
;
++
i
)
{
const
SDNodeDynConfOption
*
pOption
=
&
cfgOptions
[
i
];
if
((
strncasecmp
(
pOption
->
name
,
pOptionToken
->
z
,
pOptionToken
->
n
)
==
0
)
&&
(
pOption
->
len
==
pOptionToken
->
n
))
{
return
TSDB_CODE_SUCCESS
;
}
}
}
else
if
((
strncasecmp
(
DNODE_DYNAMIC_CFG_OPTIONS
[
DNODE_DYNAMIC_CFG_OPTIONS_SIZE
-
1
].
name
,
pOptionToken
->
z
,
pOptionToken
->
n
)
==
0
)
&&
(
DNODE_DYNAMIC_CFG_OPTIONS
[
DNODE_DYNAMIC_CFG_OPTIONS_SIZE
-
1
].
len
==
pOptionToken
->
n
))
{
}
else
if
((
strncasecmp
(
cfgOptions
[
tokenBalance
].
name
,
pOptionToken
->
z
,
pOptionToken
->
n
)
==
0
)
&&
(
cfgOptions
[
tokenBalance
].
len
==
pOptionToken
->
n
))
{
SSQLToken
*
pValToken
=
&
pOptions
->
a
[
2
];
int32_t
vnodeIndex
=
0
;
int32_t
dnodeIndex
=
0
;
strdequote
(
pValToken
->
z
);
bool
parseOk
=
taosCheckBalanceCfgOptions
(
pValToken
->
z
,
&
vnodeIndex
,
&
dnodeIndex
);
if
(
!
parseOk
)
{
return
TSDB_CODE_TSC_INVALID_SQL
;
// options value is invalid
}
return
TSDB_CODE_SUCCESS
;
}
else
if
((
strncasecmp
(
cfgOptions
[
tokenMonitor
].
name
,
pOptionToken
->
z
,
pOptionToken
->
n
)
==
0
)
&&
(
cfgOptions
[
tokenMonitor
].
len
==
pOptionToken
->
n
))
{
SSQLToken
*
pValToken
=
&
pOptions
->
a
[
2
];
int32_t
val
=
strtol
(
pValToken
->
z
,
NULL
,
10
);
if
(
val
!=
0
&&
val
!=
1
)
{
...
...
@@ -4709,8 +4725,8 @@ int32_t validateDNodeConfig(tDCLSQL* pOptions) {
return
TSDB_CODE_TSC_INVALID_SQL
;
}
for
(
int32_t
i
=
2
;
i
<
DNODE_DYNAMIC_CFG_OPTIONS_SIZE
-
1
;
++
i
)
{
const
SDNodeDynConfOption
*
pOption
=
&
DNODE_DYNAMIC_CFG_OPTIONS
[
i
];
for
(
int32_t
i
=
tokenDebugFlag
;
i
<
tokenDebugFlagEnd
;
++
i
)
{
const
SDNodeDynConfOption
*
pOption
=
&
cfgOptions
[
i
];
if
((
strncasecmp
(
pOption
->
name
,
pOptionToken
->
z
,
pOptionToken
->
n
)
==
0
)
&&
(
pOption
->
len
==
pOptionToken
->
n
))
{
/* options is valid */
...
...
src/common/inc/tglobal.h
浏览文件 @
0cd94b9b
...
...
@@ -174,6 +174,7 @@ bool taosCheckGlobalCfg();
void
taosSetAllDebugFlag
();
bool
taosCfgDynamicOptions
(
char
*
msg
);
int
taosGetFqdnPortFromEp
(
const
char
*
ep
,
char
*
fqdn
,
uint16_t
*
port
);
bool
taosCheckBalanceCfgOptions
(
const
char
*
option
,
int32_t
*
vnodeIndex
,
int32_t
*
dnodeIndex
);
#ifdef __cplusplus
}
...
...
src/common/src/tglobal.c
浏览文件 @
0cd94b9b
...
...
@@ -198,6 +198,7 @@ int32_t tsdbDebugFlag = 131;
int32_t
(
*
monitorStartSystemFp
)()
=
NULL
;
void
(
*
monitorStopSystemFp
)()
=
NULL
;
void
(
*
monitorExecuteSQLFp
)(
char
*
sql
)
=
NULL
;
static
pthread_once_t
tsInitGlobalCfgOnce
=
PTHREAD_ONCE_INIT
;
...
...
@@ -252,11 +253,15 @@ bool taosCfgDynamicOptions(char *msg) {
if
(
monitorStartSystemFp
)
{
(
*
monitorStartSystemFp
)();
uInfo
(
"monitor is enabled"
);
}
else
{
uError
(
"monitor can't be updated, for monitor not initialized"
);
}
}
else
{
if
(
monitorStopSystemFp
)
{
(
*
monitorStopSystemFp
)();
uInfo
(
"monitor is disabled"
);
}
else
{
uError
(
"monitor can't be updated, for monitor not initialized"
);
}
}
return
true
;
...
...
@@ -276,7 +281,12 @@ bool taosCfgDynamicOptions(char *msg) {
}
if
(
strncasecmp
(
option
,
"resetQueryCache"
,
15
)
==
0
)
{
uError
(
"reset query cache can't be executed, for monitor not initialized"
);
if
(
monitorExecuteSQLFp
)
{
(
*
monitorExecuteSQLFp
)(
"resetQueryCache"
);
uInfo
(
"resetquerycache is executed"
);
}
else
{
uError
(
"resetquerycache can't be executed, for monitor not started"
);
}
}
return
false
;
...
...
@@ -1300,3 +1310,32 @@ int taosGetFqdnPortFromEp(const char *ep, char *fqdn, uint16_t *port) {
return
0
;
}
/*
* alter dnode 1 balance "vnode:1-dnode:2"
*/
bool
taosCheckBalanceCfgOptions
(
const
char
*
option
,
int32_t
*
vnodeIndex
,
int32_t
*
dnodeIndex
)
{
int
len
=
strlen
(
option
);
if
(
strncasecmp
(
option
,
"vnode:"
,
6
)
!=
0
)
{
return
false
;
}
int
pos
=
0
;
for
(;
pos
<
len
;
++
pos
)
{
if
(
option
[
pos
]
==
'-'
)
break
;
}
if
(
++
pos
>=
len
)
return
false
;
if
(
strncasecmp
(
option
+
pos
,
"dnode:"
,
6
)
!=
0
)
{
return
false
;
}
*
vnodeIndex
=
strtol
(
option
+
6
,
NULL
,
10
);
*
dnodeIndex
=
strtol
(
option
+
pos
+
6
,
NULL
,
10
);
if
(
*
vnodeIndex
<=
1
||
*
dnodeIndex
<=
0
)
{
return
false
;
}
return
true
;
}
\ No newline at end of file
src/inc/taoserror.h
浏览文件 @
0cd94b9b
...
...
@@ -227,6 +227,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_GRANT_CPU_LIMITED, 0, 0x080B, "grant cpu
// sync
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_INVALID_CONFIG
,
0
,
0x0900
,
"sync invalid configuration"
)
TAOS_DEFINE_ERROR
(
TSDB_CODE_SYN_NOT_ENABLED
,
0
,
0x0901
,
"sync module not enabled"
)
// wal
TAOS_DEFINE_ERROR
(
TSDB_CODE_WAL_APP_ERROR
,
0
,
0x1000
,
"wal app error"
)
...
...
src/inc/tbalance.h
浏览文件 @
0cd94b9b
...
...
@@ -29,6 +29,7 @@ void balanceAsyncNotify();
void
balanceSyncNotify
();
void
balanceReset
();
int32_t
balanceAllocVnodes
(
struct
SVgObj
*
pVgroup
);
int32_t
balanceCfgDnode
(
struct
SDnodeObj
*
pDnode
,
const
char
*
option
);
int32_t
balanceDropDnode
(
struct
SDnodeObj
*
pDnode
);
#ifdef __cplusplus
...
...
src/mnode/src/mnodeBalance.c
浏览文件 @
0cd94b9b
...
...
@@ -28,6 +28,7 @@ void balanceCleanUp() {}
void
balanceAsyncNotify
()
{}
void
balanceSyncNotify
()
{}
void
balanceReset
()
{}
int32_t
balanceCfgDnode
(
struct
SDnodeObj
*
pDnode
,
const
char
*
option
)
{
return
TSDB_CODE_SYN_NOT_ENABLED
;
}
int32_t
balanceAllocVnodes
(
SVgObj
*
pVgroup
)
{
void
*
pIter
=
NULL
;
...
...
src/mnode/src/mnodeDnode.c
浏览文件 @
0cd94b9b
...
...
@@ -279,27 +279,27 @@ static int32_t mnodeProcessCfgDnodeMsg(SMnodeMsg *pMsg) {
tstrncpy
(
pCmCfgDnode
->
ep
,
tsLocalEp
,
TSDB_EP_LEN
);
}
int32_t
dnodeId
=
0
;
char
*
pos
=
strchr
(
pCmCfgDnode
->
ep
,
':'
);
if
(
NULL
==
pos
)
{
dnodeId
=
strtol
(
pCmCfgDnode
->
ep
,
NULL
,
10
);
SDnodeObj
*
pDnode
=
mnodeGetDnodeByEp
(
pCmCfgDnode
->
ep
);
if
(
pDnode
==
NULL
)
{
int32_t
dnodeId
=
strtol
(
pCmCfgDnode
->
ep
,
NULL
,
10
);
if
(
dnodeId
<=
0
||
dnodeId
>
65536
)
{
mError
(
"failed to cfg dnode, invalid dnode
Id
:%s"
,
pCmCfgDnode
->
ep
);
mError
(
"failed to cfg dnode, invalid dnode
Ep
:%s"
,
pCmCfgDnode
->
ep
);
return
TSDB_CODE_MND_DNODE_NOT_EXIST
;
}
}
SRpcEpSet
epSet
=
mnodeGetEpSetFromIp
(
pCmCfgDnode
->
ep
);
if
(
dnodeId
!=
0
)
{
SDnodeObj
*
pDnode
=
mnodeGetDnode
(
dnodeId
);
pDnode
=
mnodeGetDnode
(
dnodeId
);
if
(
pDnode
==
NULL
)
{
mError
(
"failed to cfg dnode, invalid dnodeId:%d"
,
dnodeId
);
return
TSDB_CODE_MND_DNODE_NOT_EXIST
;
}
epSet
=
mnodeGetEpSetFromIp
(
pDnode
->
dnodeEp
);
mnodeDecDnodeRef
(
pDnode
);
}
SRpcEpSet
epSet
=
mnodeGetEpSetFromIp
(
pDnode
->
dnodeEp
);
mnodeDecDnodeRef
(
pDnode
);
if
(
strncasecmp
(
pCmCfgDnode
->
config
,
"balance"
,
7
)
==
0
)
{
return
balanceCfgDnode
(
pDnode
,
pCmCfgDnode
->
config
+
8
);
}
else
{
SMDCfgDnodeMsg
*
pMdCfgDnode
=
rpcMallocCont
(
sizeof
(
SMDCfgDnodeMsg
));
strcpy
(
pMdCfgDnode
->
ep
,
pCmCfgDnode
->
ep
);
strcpy
(
pMdCfgDnode
->
config
,
pCmCfgDnode
->
config
);
...
...
@@ -314,8 +314,8 @@ static int32_t mnodeProcessCfgDnodeMsg(SMnodeMsg *pMsg) {
mInfo
(
"dnode:%s, is configured by %s"
,
pCmCfgDnode
->
ep
,
pMsg
->
pUser
->
user
);
dnodeSendMsgToDnode
(
&
epSet
,
&
rpcMdCfgDnodeMsg
);
return
TSDB_CODE_SUCCESS
;
}
}
static
void
mnodeProcessCfgDnodeMsgRsp
(
SRpcMsg
*
rpcMsg
)
{
...
...
src/plugins/monitor/src/monitorMain.c
浏览文件 @
0cd94b9b
...
...
@@ -27,7 +27,6 @@
#include "dnode.h"
#include "monitor.h"
#define monitorFatal(...) { if (monitorDebugFlag & DEBUG_FATAL) { taosPrintLog("MON FATAL ", 255, __VA_ARGS__); }}
#define monitorError(...) { if (monitorDebugFlag & DEBUG_ERROR) { taosPrintLog("MON ERROR ", 255, __VA_ARGS__); }}
#define monitorWarn(...) { if (monitorDebugFlag & DEBUG_WARN) { taosPrintLog("MON WARN ", 255, __VA_ARGS__); }}
...
...
@@ -78,6 +77,7 @@ static void monitorStartTimer();
static
void
monitorSaveSystemInfo
();
extern
int32_t
(
*
monitorStartSystemFp
)();
extern
void
(
*
monitorStopSystemFp
)();
extern
void
(
*
monitorExecuteSQLFp
)(
char
*
sql
);
static
void
monitorCheckDiskUsage
(
void
*
para
,
void
*
unused
)
{
taosGetDisk
();
...
...
@@ -207,6 +207,7 @@ static void monitorInitDatabase() {
taos_query_a
(
tsMonitorConn
.
conn
,
tsMonitorConn
.
sql
,
monitorInitDatabaseCb
,
NULL
);
}
else
{
tsMonitorConn
.
state
=
MONITOR_STATE_INITIALIZED
;
monitorExecuteSQLFp
=
monitorExecuteSQL
;
monitorInfo
(
"monitor service init success"
);
monitorStartTimer
();
...
...
@@ -230,6 +231,7 @@ static void monitorInitDatabaseCb(void *param, TAOS_RES *result, int32_t code) {
void
monitorStopSystem
()
{
monitorInfo
(
"monitor module is stopped"
);
monitorExecuteSQLFp
=
NULL
;
tsMonitorConn
.
state
=
MONITOR_STATE_STOPPED
;
if
(
tsMonitorConn
.
initTimer
!=
NULL
)
{
taosTmrStopA
(
&
(
tsMonitorConn
.
initTimer
));
...
...
@@ -248,33 +250,13 @@ static void monitorStartTimer() {
taosTmrReset
(
monitorSaveSystemInfo
,
tsMonitorInterval
*
1000
,
NULL
,
tscTmr
,
&
tsMonitorConn
.
timer
);
}
static
void
dnodeMontiorInsertAcctCallback
(
void
*
param
,
TAOS_RES
*
result
,
int32_t
code
)
{
if
(
code
<
0
)
{
monitorError
(
"monitor:%p, save account info failed, code:%s"
,
tsMonitorConn
.
conn
,
tstrerror
(
code
));
}
else
if
(
code
==
0
)
{
monitorError
(
"monitor:%p, save account info failed, affect rows:%d"
,
tsMonitorConn
.
conn
,
code
);
}
else
{
monitorDebug
(
"monitor:%p, save account info success, code:%s"
,
tsMonitorConn
.
conn
,
tstrerror
(
code
));
}
}
static
void
dnodeMontiorInsertSysCallback
(
void
*
param
,
TAOS_RES
*
result
,
int32_t
code
)
{
static
void
dnodeMontiorLogCallback
(
void
*
param
,
TAOS_RES
*
result
,
int32_t
code
)
{
if
(
code
<
0
)
{
monitorError
(
"monitor:%p, save
system info failed, code:%s %s"
,
tsMonitorConn
.
conn
,
tstrerror
(
code
),
tsMonitorConn
.
sql
);
monitorError
(
"monitor:%p, save
%s failed, reason:%s"
,
tsMonitorConn
.
conn
,
(
char
*
)
param
,
tstrerror
(
code
)
);
}
else
if
(
code
==
0
)
{
monitorError
(
"monitor:%p, save
system info failed, affect rows:%d %s"
,
tsMonitorConn
.
conn
,
code
,
tsMonitorConn
.
sql
);
monitorError
(
"monitor:%p, save
%s failed, affect rows:%d"
,
tsMonitorConn
.
conn
,
(
char
*
)
param
,
code
);
}
else
{
monitorDebug
(
"monitor:%p, save system info success, code:%s %s"
,
tsMonitorConn
.
conn
,
tstrerror
(
code
),
tsMonitorConn
.
sql
);
}
}
static
void
dnodeMontiorInsertLogCallback
(
void
*
param
,
TAOS_RES
*
result
,
int32_t
code
)
{
if
(
code
<
0
)
{
monitorError
(
"monitor:%p, save log failed, code:%s"
,
tsMonitorConn
.
conn
,
tstrerror
(
code
));
}
else
if
(
code
==
0
)
{
monitorError
(
"monitor:%p, save log failed, affect rows:%d"
,
tsMonitorConn
.
conn
,
code
);
}
else
{
monitorDebug
(
"monitor:%p, save log info success, code:%s"
,
tsMonitorConn
.
conn
,
tstrerror
(
code
));
monitorDebug
(
"monitor:%p, save %s info success, reason:%s"
,
tsMonitorConn
.
conn
,
(
char
*
)
param
,
tstrerror
(
code
));
}
}
...
...
@@ -359,7 +341,7 @@ static void monitorSaveSystemInfo() {
pos
+=
monitorBuildReqSql
(
sql
+
pos
);
monitorDebug
(
"monitor:%p, save system info, sql:%s"
,
tsMonitorConn
.
conn
,
sql
);
taos_query_a
(
tsMonitorConn
.
conn
,
sql
,
dnodeMontior
InsertSysCallback
,
"log
"
);
taos_query_a
(
tsMonitorConn
.
conn
,
sql
,
dnodeMontior
LogCallback
,
"sys
"
);
if
(
tsMonitorConn
.
timer
!=
NULL
&&
tsMonitorConn
.
state
!=
MONITOR_STATE_STOPPED
)
{
monitorStartTimer
();
...
...
@@ -397,7 +379,7 @@ void monitorSaveAcctLog(SAcctMonitorObj *pMon) {
pMon
->
accessState
);
monitorDebug
(
"monitor:%p, save account info, sql %s"
,
tsMonitorConn
.
conn
,
sql
);
taos_query_a
(
tsMonitorConn
.
conn
,
sql
,
dnodeMontior
InsertAcct
Callback
,
"account"
);
taos_query_a
(
tsMonitorConn
.
conn
,
sql
,
dnodeMontior
Log
Callback
,
"account"
);
}
void
monitorSaveLog
(
int32_t
level
,
const
char
*
const
format
,
...)
{
...
...
@@ -421,14 +403,11 @@ void monitorSaveLog(int32_t level, const char *const format, ...) {
sql
[
len
++
]
=
0
;
monitorDebug
(
"monitor:%p, save log, sql: %s"
,
tsMonitorConn
.
conn
,
sql
);
taos_query_a
(
tsMonitorConn
.
conn
,
sql
,
dnodeMontior
Insert
LogCallback
,
"log"
);
taos_query_a
(
tsMonitorConn
.
conn
,
sql
,
dnodeMontiorLogCallback
,
"log"
);
}
void
monitorExecuteSQL
(
char
*
sql
)
{
if
(
tsMonitorConn
.
state
!=
MONITOR_STATE_INITIALIZED
)
return
;
monitorDebug
(
"monitor:%p, execute sql: %s"
,
tsMonitorConn
.
conn
,
sql
);
// bug while insert binary
// taos_query_a(tsMonitorConn.conn, sql, NULL, NULL);
taos_query_a
(
tsMonitorConn
.
conn
,
sql
,
dnodeMontiorLogCallback
,
"sql"
);
}
tests/script/general/alter/dnode.sim
0 → 100644
浏览文件 @
0cd94b9b
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/cfg.sh -n dnode1 -c walLevel -v 2
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
print ======== step1
sql alter dnode 1 resetlog
sql alter dnode 1 monitor 1
sleep 5000
sql select * from log.dn
if $rows <= 0 then
return -1
endi
print ======== step2
sql alter dnode 1 resetquerycache
sql alter dnode 1 debugFlag 135
sql alter dnode 1 debugFlag 131
sql alter dnode 1 monitor 0
sql alter dnode 1 debugFlag 135
sql alter dnode 1 monitorDebugFlag 135
sql alter dnode 1 vDebugFlag 135
sql alter dnode 1 mDebugFlag 135
sql alter dnode 1 cDebugFlag 135
sql alter dnode 1 httpDebugFlag 135
sql alter dnode 1 qDebugflag 135
sql alter dnode 1 sdbDebugFlag 135
sql alter dnode 1 uDebugFlag 135
sql alter dnode 1 tsdbDebugFlag 135
sql alter dnode 1 sDebugflag 135
sql alter dnode 1 rpcDebugFlag 135
sql alter dnode 1 dDebugFlag 135
sql alter dnode 1 mqttDebugFlag 135
sql alter dnode 1 wDebugFlag 135
sql alter dnode 1 tmrDebugFlag 135
sql_error alter dnode 2 wDebugFlag 135
sql_error alter dnode 2 tmrDebugFlag 135
print ======== step3
sql_error alter $hostname1 debugFlag 135
sql_error alter $hostname1 monitorDebugFlag 135
sql_error alter $hostname1 vDebugFlag 135
sql_error alter $hostname1 mDebugFlag 135
sql_error alter dnode $hostname2 debugFlag 135
sql_error alter dnode $hostname2 monitorDebugFlag 135
sql_error alter dnode $hostname2 vDebugFlag 135
sql_error alter dnode $hostname2 mDebugFlag 135
sql alter dnode $hostname1 debugFlag 135
sql alter dnode $hostname1 monitorDebugFlag 135
sql alter dnode $hostname1 vDebugFlag 135
sql alter dnode $hostname1 tmrDebugFlag 131
print ======== step4
sql_error sql alter dnode 1 balance 0
sql_error sql alter dnode 1 balance vnode:1-dnode:1
sql_error sql alter dnode 1 balance "vnode:1"
sql_error sql alter dnode 1 balance "vnode:1-dnode:1"
sql_error sql alter dnode 1 balance "dnode:1-vnode:1"
sql_error sql alter dnode 1 balance "dnode:1-"
sql_error sql alter dnode 1 balance "vnode:2-dnod"
sql alter dnode 1 balance "vnode:2-dnode:1" -x step4
step4:
print ======= over
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
tests/script/jenkins/basic.txt
浏览文件 @
0cd94b9b
...
...
@@ -3,6 +3,7 @@ cd ../../../debug; make
./test.sh -f general/alter/cached_schema_after_alter.sim
./test.sh -f general/alter/count.sim
./test.sh -f general/alter/dnode.sim
./test.sh -f general/alter/import.sim
./test.sh -f general/alter/insert1.sim
./test.sh -f general/alter/insert2.sim
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录