Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qq_50753323
TDengine
提交
69dbb70a
T
TDengine
项目概览
qq_50753323
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
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,发现更多精彩内容 >>
提交
69dbb70a
编写于
5月 02, 2020
作者:
S
slguan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TD-150] Let mnode changes be processed in a status message
上级
099ffbd0
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
42 addition
and
37 deletion
+42
-37
src/mnode/src/mgmtDb.c
src/mnode/src/mgmtDb.c
+7
-0
src/mnode/src/mgmtSdb.c
src/mnode/src/mgmtSdb.c
+4
-2
tests/script/unique/column/replica3.sim
tests/script/unique/column/replica3.sim
+12
-15
tests/script/unique/metrics/testSuite.sim
tests/script/unique/metrics/testSuite.sim
+4
-4
tests/script/unique/stream/testSuite.sim
tests/script/unique/stream/testSuite.sim
+15
-15
tests/script/unique/vnode/replica2_basic.sim
tests/script/unique/vnode/replica2_basic.sim
+0
-1
未找到文件。
src/mnode/src/mgmtDb.c
浏览文件 @
69dbb70a
...
...
@@ -261,6 +261,13 @@ static int32_t mgmtCheckDbCfg(SDbCfg *pCfg) {
return
TSDB_CODE_INVALID_OPTION
;
}
#ifndef _SYNC
if
(
pCfg
->
replications
!=
1
)
{
mError
(
"invalid db option replications:%d can only be 1 in this version"
,
pCfg
->
replications
);
return
TSDB_CODE_INVALID_OPTION
;
}
#endif
return
TSDB_CODE_SUCCESS
;
}
...
...
src/mnode/src/mgmtSdb.c
浏览文件 @
69dbb70a
...
...
@@ -184,6 +184,7 @@ void sdbUpdateMnodeRoles() {
if
(
pMnode
!=
NULL
)
{
pMnode
->
role
=
roles
.
role
[
i
];
sdbPrint
(
"mnode:%d, role:%s"
,
pMnode
->
mnodeId
,
mgmtGetMnodeRoleStr
(
pMnode
->
role
));
if
(
pMnode
->
mnodeId
==
dnodeGetDnodeId
())
tsSdbObj
.
role
=
pMnode
->
role
;
mgmtDecMnodeRef
(
pMnode
);
}
}
...
...
@@ -221,7 +222,7 @@ static int32_t sdbForwardToPeer(SWalHead *pHead) {
int32_t
code
=
syncForwardToPeer
(
tsSdbObj
.
sync
,
pHead
,
(
void
*
)
pHead
->
version
);
if
(
code
>
0
)
{
sdbTrace
(
"forward request is sent, version:%"
PRIu64
",
result:%s"
,
pHead
->
version
,
tstrerror
(
code
)
);
sdbTrace
(
"forward request is sent, version:%"
PRIu64
",
code:%d"
,
pHead
->
version
,
code
);
sem_wait
(
&
tsSdbObj
.
sem
);
return
tsSdbObj
.
code
;
}
...
...
@@ -288,12 +289,13 @@ void sdbUpdateSync() {
syncInfo
.
confirmForward
=
sdbConfirmForward
;
syncInfo
.
notifyRole
=
sdbNotifyRole
;
tsSdbObj
.
cfg
=
syncCfg
;
if
(
tsSdbObj
.
sync
)
{
syncReconfig
(
tsSdbObj
.
sync
,
&
syncCfg
);
}
else
{
tsSdbObj
.
sync
=
syncStart
(
&
syncInfo
);
}
sdbUpdateMnodeRoles
();
}
int32_t
sdbInit
()
{
...
...
tests/script/unique/column/replica3.sim
浏览文件 @
69dbb70a
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/cfg.sh -n dnode1 -c c
ommitLog -v 0
system sh/cfg.sh -n dnode2 -c c
ommitLog -v 0
system sh/cfg.sh -n dnode3 -c c
ommitLog -v 0
system sh/cfg.sh -n dnode1 -c c
log -v 2
system sh/cfg.sh -n dnode2 -c c
log -v 2
system sh/cfg.sh -n dnode3 -c c
log -v 2
system sh/cfg.sh -n dnode1 -c numofMpeers -v 3
system sh/cfg.sh -n dnode2 -c numofMpeers -v 3
system sh/cfg.sh -n dnode3 -c numofMpeers -v 3
system sh/exec.sh -n dnode1 -s start
system sh/exec
_up
.sh -n dnode1 -s start
sql connect
sql create dnode $hostname2
sql create dnode $hostname3
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec
_up
.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode3 -s start
sql create database db replica 3
sql use db
sql create table mt (ts timestamp, f1 float, f2 float, f3 float, f4 float, f5 float, f6 float, f7 float, f8 float, f9 float, f10 float) tags (t1 int, t2 int)
sql create table
tb1 using
mt tags(1, 2)
sql create table
db.
mt (ts timestamp, f1 float, f2 float, f3 float, f4 float, f5 float, f6 float, f7 float, f8 float, f9 float, f10 float) tags (t1 int, t2 int)
sql create table
db.tb1 using db.
mt tags(1, 2)
sleep 3001
$x = 1000
while $x <
200
0
while $x <
101
0
sql insert into tb1 values (now+1s , $x , $x , $x , $x , $x , $x , $x , $x , $x , $x )
$x = $x + 1
endw
system sh/exec.sh -n dnode1 -s stop
system sh/exec.sh -n dnode2 -s stop
system sh/exec.sh -n dnode3 -s stop
system sh/exec_up.sh -n dnode1 -s stop
system sh/exec_up.sh -n dnode2 -s stop
system sh/exec_up.sh -n dnode3 -s stop
tests/script/unique/metrics/testSuite.sim
浏览文件 @
69dbb70a
run unique/metrics/disk.sim
run unique/metrics/metrics.sim
run unique/metrics/values.sim
run unique/metrics/vnode3.sim
\ No newline at end of file
#run unique/metrics/disk.sim
#run unique/metrics/metrics.sim
#run unique/metrics/values.sim
#run unique/metrics/vnode3.sim
\ No newline at end of file
tests/script/unique/stream/testSuite.sim
浏览文件 @
69dbb70a
run unique/stream/table_replica1_dnode2.sim
run unique/stream/metrics_replica1_dnode2.sim
run unique/stream/table_replica2_dnode2.sim
run unique/stream/metrics_replica2_dnode2.sim
run unique/stream/table_replica2_dnode2_vnoden.sim
run unique/stream/metrics_replica2_dnode2_vnoden.sim
run unique/stream/table_replica2_dnode3.sim
run unique/stream/metrics_replica2_dnode3.sim
run unique/stream/table_replica3_dnode4.sim
run unique/stream/metrics_replica3_dnode4.sim
run unique/stream/table_vnode_stop.sim
run unique/stream/metrics_vnode_stop.sim
#run unique/stream/table_balance.sim
#run unique/stream/metrics_balance.sim
#run unique/stream/table_move.sim
\ No newline at end of file
#run unique/stream/table_replica1_dnode2.sim
#run unique/stream/metrics_replica1_dnode2.sim
#run unique/stream/table_replica2_dnode2.sim
#run unique/stream/metrics_replica2_dnode2.sim
#run unique/stream/table_replica2_dnode2_vnoden.sim
#run unique/stream/metrics_replica2_dnode2_vnoden.sim
#run unique/stream/table_replica2_dnode3.sim
#run unique/stream/metrics_replica2_dnode3.sim
#run unique/stream/table_replica3_dnode4.sim
#run unique/stream/metrics_replica3_dnode4.sim
#run unique/stream/table_vnode_stop.sim
#run unique/stream/metrics_vnode_stop.sim
##run unique/stream/table_balance.sim
##run unique/stream/metrics_balance.sim
##run unique/stream/table_move.sim
\ No newline at end of file
tests/script/unique/vnode/replica2_basic.sim
浏览文件 @
69dbb70a
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode1 -c commitLog -v 0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录