Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
52443d34
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
52443d34
编写于
12月 01, 2022
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
差异文件
Merge branch '3.0' of
https://github.com/taosdata/TDengine
into refact/submit_req
上级
3700f0dc
b69d6f8d
变更
24
隐藏空白更改
内联
并排
Showing
24 changed file
with
123 addition
and
50 deletion
+123
-50
docs/zh/27-train-faq/01-faq.md
docs/zh/27-train-faq/01-faq.md
+42
-0
include/common/tmsg.h
include/common/tmsg.h
+1
-0
source/common/src/tmsg.c
source/common/src/tmsg.c
+10
-0
source/dnode/mnode/impl/inc/mndDef.h
source/dnode/mnode/impl/inc/mndDef.h
+1
-0
source/dnode/mnode/impl/src/mndDnode.c
source/dnode/mnode/impl/src/mndDnode.c
+12
-8
source/dnode/mnode/impl/src/mndMain.c
source/dnode/mnode/impl/src/mndMain.c
+12
-7
source/dnode/mnode/impl/src/mndVgroup.c
source/dnode/mnode/impl/src/mndVgroup.c
+11
-2
source/dnode/vnode/src/vnd/vnodeQuery.c
source/dnode/vnode/src/vnd/vnodeQuery.c
+1
-0
source/dnode/vnode/src/vnd/vnodeSync.c
source/dnode/vnode/src/vnd/vnodeSync.c
+2
-2
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py
...t/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py
+3
-3
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py
...-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py
+2
-2
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py
...r/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py
+2
-2
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py
...-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py
+2
-2
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py
...r/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py
+2
-2
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py
...sic_replica3_insertdatas_querys_loop_restart_all_vnode.py
+2
-2
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py
...asic_replica3_insertdatas_querys_loop_restart_follower.py
+2
-2
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py
..._basic_replica3_insertdatas_querys_loop_restart_leader.py
+2
-2
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py
...de1mnode_basic_replica3_insertdatas_stop_follower_sync.py
+2
-2
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py
...1mnode_basic_replica3_insertdatas_stop_follower_unsync.py
+2
-2
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py
...c_replica3_insertdatas_stop_follower_unsync_force_stop.py
+2
-2
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py
...ode_basic_replica3_insertdatas_stop_leader_forece_stop.py
+2
-2
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py
.../4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py
+2
-2
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py
...st/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py
+2
-2
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py
...ster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py
+2
-2
未找到文件。
docs/zh/27-train-faq/01-faq.md
浏览文件 @
52443d34
...
...
@@ -201,3 +201,45 @@ TDengine 中时间戳的时区总是由客户端进行处理,而与服务端
OOM 是操作系统的保护机制,当操作系统内存(包括 SWAP )不足时,会杀掉某些进程,从而保证操作系统的稳定运行。通常内存不足主要是如下两个原因导致,一是剩余内存小于 vm.min_free_kbytes ;二是程序请求的内存大于剩余内存。还有一种情况是内存充足但程序占用了特殊的内存地址,也会触发 OOM 。
TDengine 会预先为每个 VNode 分配好内存,每个 Database 的 VNode 个数受 建库时的vgroups参数影响,每个 VNode 占用的内存大小受 buffer参数 影响。要防止 OOM,需要在项目建设之初合理规划内存,并合理设置 SWAP ,除此之外查询过量的数据也有可能导致内存暴涨,这取决于具体的查询语句。TDengine 企业版对内存管理做了优化,采用了新的内存分配器,对稳定性有更高要求的用户可以考虑选择企业版。
### 19. 在macOS上遇到Too many open files怎么办?
taosd日志文件报错Too many open file,是由于taosd打开文件数超过系统设置的上限所致。
解决方案如下:
1.
新建文件 /Library/LaunchDaemons/limit.maxfiles.plist,写入以下内容(以下示例将limit和maxfiles改为10万,可按需修改):
```
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist
version=
"1.0"
>
<dict>
<key>
Label
</key>
<string>
limit.maxfiles
</string>
<key>
ProgramArguments
</key>
<array>
<string>
launchctl
</string>
<string>
limit
</string>
<string>
maxfiles
</string>
<string>
100000
</string>
<string>
100000
</string>
</array>
<key>
RunAtLoad
</key>
<true/>
<key>
ServiceIPC
</key>
<false/>
</dict>
</plist>
```
2.
修改文件权限
```
sudo chown root:wheel /Library/LaunchDaemons/limit.maxfiles.plist
sudo chmod 644 /Library/LaunchDaemons/limit.maxfiles.plist
```
3.
加载 plist 文件 (或重启系统后生效。launchd在启动时会自动加载该目录的 plist)
```
sudo launchctl load -w /Library/LaunchDaemons/limit.maxfiles.plist
```
4.
确认更改后的限制
```
launchctl limit maxfiles
```
include/common/tmsg.h
浏览文件 @
52443d34
...
...
@@ -1059,6 +1059,7 @@ typedef struct {
int32_t
vgId
;
int8_t
syncState
;
int8_t
syncRestore
;
int8_t
syncCanRead
;
int64_t
cacheUsage
;
int64_t
numOfTables
;
int64_t
numOfTimeSeries
;
...
...
source/common/src/tmsg.c
浏览文件 @
52443d34
...
...
@@ -992,15 +992,20 @@ int32_t tSerializeSStatusReq(void *buf, int32_t bufLen, SStatusReq *pReq) {
if
(
tEncodeI32
(
&
encoder
,
vlen
)
<
0
)
return
-
1
;
for
(
int32_t
i
=
0
;
i
<
vlen
;
++
i
)
{
SVnodeLoad
*
pload
=
taosArrayGet
(
pReq
->
pVloads
,
i
);
int64_t
reserved
=
0
;
if
(
tEncodeI32
(
&
encoder
,
pload
->
vgId
)
<
0
)
return
-
1
;
if
(
tEncodeI8
(
&
encoder
,
pload
->
syncState
)
<
0
)
return
-
1
;
if
(
tEncodeI8
(
&
encoder
,
pload
->
syncRestore
)
<
0
)
return
-
1
;
if
(
tEncodeI8
(
&
encoder
,
pload
->
syncCanRead
)
<
0
)
return
-
1
;
if
(
tEncodeI64
(
&
encoder
,
pload
->
cacheUsage
)
<
0
)
return
-
1
;
if
(
tEncodeI64
(
&
encoder
,
pload
->
numOfTables
)
<
0
)
return
-
1
;
if
(
tEncodeI64
(
&
encoder
,
pload
->
numOfTimeSeries
)
<
0
)
return
-
1
;
if
(
tEncodeI64
(
&
encoder
,
pload
->
totalStorage
)
<
0
)
return
-
1
;
if
(
tEncodeI64
(
&
encoder
,
pload
->
compStorage
)
<
0
)
return
-
1
;
if
(
tEncodeI64
(
&
encoder
,
pload
->
pointsWritten
)
<
0
)
return
-
1
;
if
(
tEncodeI64
(
&
encoder
,
reserved
)
<
0
)
return
-
1
;
if
(
tEncodeI64
(
&
encoder
,
reserved
)
<
0
)
return
-
1
;
if
(
tEncodeI64
(
&
encoder
,
reserved
)
<
0
)
return
-
1
;
}
// mnode loads
...
...
@@ -1065,15 +1070,20 @@ int32_t tDeserializeSStatusReq(void *buf, int32_t bufLen, SStatusReq *pReq) {
for
(
int32_t
i
=
0
;
i
<
vlen
;
++
i
)
{
SVnodeLoad
vload
=
{
0
};
int64_t
reserved
=
0
;
if
(
tDecodeI32
(
&
decoder
,
&
vload
.
vgId
)
<
0
)
return
-
1
;
if
(
tDecodeI8
(
&
decoder
,
&
vload
.
syncState
)
<
0
)
return
-
1
;
if
(
tDecodeI8
(
&
decoder
,
&
vload
.
syncRestore
)
<
0
)
return
-
1
;
if
(
tDecodeI8
(
&
decoder
,
&
vload
.
syncCanRead
)
<
0
)
return
-
1
;
if
(
tDecodeI64
(
&
decoder
,
&
vload
.
cacheUsage
)
<
0
)
return
-
1
;
if
(
tDecodeI64
(
&
decoder
,
&
vload
.
numOfTables
)
<
0
)
return
-
1
;
if
(
tDecodeI64
(
&
decoder
,
&
vload
.
numOfTimeSeries
)
<
0
)
return
-
1
;
if
(
tDecodeI64
(
&
decoder
,
&
vload
.
totalStorage
)
<
0
)
return
-
1
;
if
(
tDecodeI64
(
&
decoder
,
&
vload
.
compStorage
)
<
0
)
return
-
1
;
if
(
tDecodeI64
(
&
decoder
,
&
vload
.
pointsWritten
)
<
0
)
return
-
1
;
if
(
tDecodeI64
(
&
decoder
,
&
reserved
)
<
0
)
return
-
1
;
if
(
tDecodeI64
(
&
decoder
,
&
reserved
)
<
0
)
return
-
1
;
if
(
tDecodeI64
(
&
decoder
,
&
reserved
)
<
0
)
return
-
1
;
if
(
taosArrayPush
(
pReq
->
pVloads
,
&
vload
)
==
NULL
)
{
terrno
=
TSDB_CODE_OUT_OF_MEMORY
;
return
-
1
;
...
...
source/dnode/mnode/impl/inc/mndDef.h
浏览文件 @
52443d34
...
...
@@ -328,6 +328,7 @@ typedef struct {
int32_t
dnodeId
;
ESyncState
syncState
;
bool
syncRestore
;
bool
syncCanRead
;
}
SVnodeGid
;
typedef
struct
{
...
...
source/dnode/mnode/impl/src/mndDnode.c
浏览文件 @
52443d34
...
...
@@ -375,14 +375,18 @@ static int32_t mndProcessStatusReq(SRpcMsg *pReq) {
}
bool
roleChanged
=
false
;
for
(
int32_t
vg
=
0
;
vg
<
pVgroup
->
replica
;
++
vg
)
{
if
(
pVgroup
->
vnodeGid
[
vg
].
dnodeId
==
statusReq
.
dnodeId
)
{
if
(
pVgroup
->
vnodeGid
[
vg
].
syncState
!=
pVload
->
syncState
||
pVgroup
->
vnodeGid
[
vg
].
syncRestore
!=
pVload
->
syncRestore
)
{
mInfo
(
"vgId:%d, state changed by status msg, old state:%s restored:%d new state:%s restored:%d"
,
pVgroup
->
vgId
,
syncStr
(
pVgroup
->
vnodeGid
[
vg
].
syncState
),
pVgroup
->
vnodeGid
[
vg
].
syncRestore
,
syncStr
(
pVload
->
syncState
),
pVload
->
syncRestore
);
pVgroup
->
vnodeGid
[
vg
].
syncState
=
pVload
->
syncState
;
pVgroup
->
vnodeGid
[
vg
].
syncRestore
=
pVload
->
syncRestore
;
SVnodeGid
*
pGid
=
&
pVgroup
->
vnodeGid
[
vg
];
if
(
pGid
->
dnodeId
==
statusReq
.
dnodeId
)
{
if
(
pGid
->
syncState
!=
pVload
->
syncState
||
pGid
->
syncRestore
!=
pVload
->
syncRestore
||
pGid
->
syncCanRead
!=
pVload
->
syncCanRead
)
{
mInfo
(
"vgId:%d, state changed by status msg, old state:%s restored:%d canRead:%d new state:%s restored:%d "
"canRead:%d"
,
pVgroup
->
vgId
,
syncStr
(
pGid
->
syncState
),
pGid
->
syncRestore
,
pGid
->
syncCanRead
,
syncStr
(
pVload
->
syncState
),
pVload
->
syncRestore
,
pVload
->
syncCanRead
);
pGid
->
syncState
=
pVload
->
syncState
;
pGid
->
syncRestore
=
pVload
->
syncRestore
;
pGid
->
syncCanRead
=
pVload
->
syncCanRead
;
roleChanged
=
true
;
}
break
;
...
...
source/dnode/mnode/impl/src/mndMain.c
浏览文件 @
52443d34
...
...
@@ -150,12 +150,16 @@ static void mndSetVgroupOffline(SMnode *pMnode, int32_t dnodeId, int64_t curMs)
bool
roleChanged
=
false
;
for
(
int32_t
vg
=
0
;
vg
<
pVgroup
->
replica
;
++
vg
)
{
if
(
pVgroup
->
vnodeGid
[
vg
].
dnodeId
==
dnodeId
)
{
if
(
pVgroup
->
vnodeGid
[
vg
].
syncState
!=
TAOS_SYNC_STATE_OFFLINE
)
{
mInfo
(
"vgId:%d, state changed by offline check, old state:%s restored:%d new state:error restored:0"
,
pVgroup
->
vgId
,
syncStr
(
pVgroup
->
vnodeGid
[
vg
].
syncState
),
pVgroup
->
vnodeGid
[
vg
].
syncRestore
);
pVgroup
->
vnodeGid
[
vg
].
syncState
=
TAOS_SYNC_STATE_OFFLINE
;
pVgroup
->
vnodeGid
[
vg
].
syncRestore
=
0
;
SVnodeGid
*
pGid
=
&
pVgroup
->
vnodeGid
[
vg
];
if
(
pGid
->
dnodeId
==
dnodeId
)
{
if
(
pGid
->
syncState
!=
TAOS_SYNC_STATE_OFFLINE
)
{
mInfo
(
"vgId:%d, state changed by offline check, old state:%s restored:%d canRead:%d new state:error restored:0 "
"canRead:0"
,
pVgroup
->
vgId
,
syncStr
(
pGid
->
syncState
),
pGid
->
syncRestore
,
pGid
->
syncCanRead
);
pGid
->
syncState
=
TAOS_SYNC_STATE_OFFLINE
;
pGid
->
syncRestore
=
0
;
pGid
->
syncCanRead
=
0
;
roleChanged
=
true
;
}
break
;
...
...
@@ -491,7 +495,7 @@ void mndPreClose(SMnode *pMnode) {
if
(
pMnode
!=
NULL
)
{
syncLeaderTransfer
(
pMnode
->
syncMgmt
.
sync
);
syncPreStop
(
pMnode
->
syncMgmt
.
sync
);
#if 0
while (syncSnapshotRecving(pMnode->syncMgmt.sync)) {
mInfo("vgId:1, snapshot is recving");
taosMsleep(300);
...
...
@@ -500,6 +504,7 @@ void mndPreClose(SMnode *pMnode) {
mInfo("vgId:1, snapshot is sending");
taosMsleep(300);
}
#endif
}
}
...
...
source/dnode/mnode/impl/src/mndVgroup.c
浏览文件 @
52443d34
...
...
@@ -186,6 +186,7 @@ static int32_t mndVgroupActionUpdate(SSdb *pSdb, SVgObj *pOld, SVgObj *pNew) {
if
(
pNewGid
->
dnodeId
==
pOldGid
->
dnodeId
)
{
pNewGid
->
syncState
=
pOldGid
->
syncState
;
pNewGid
->
syncRestore
=
pOldGid
->
syncRestore
;
pNewGid
->
syncCanRead
=
pOldGid
->
syncCanRead
;
}
}
}
...
...
@@ -696,8 +697,16 @@ static int32_t mndRetrieveVgroups(SRpcMsg *pReq, SShowObj *pShow, SSDataBlock *p
if
(
!
exist
)
{
strcpy
(
role
,
"dropping"
);
}
else
if
(
online
)
{
bool
show
=
(
pVgroup
->
vnodeGid
[
i
].
syncState
==
TAOS_SYNC_STATE_LEADER
&&
!
pVgroup
->
vnodeGid
[
i
].
syncRestore
);
snprintf
(
role
,
sizeof
(
role
),
"%s%s"
,
syncStr
(
pVgroup
->
vnodeGid
[
i
].
syncState
),
show
?
"*"
:
""
);
char
*
star
=
""
;
if
(
pVgroup
->
vnodeGid
[
i
].
syncState
==
TAOS_SYNC_STATE_LEADER
)
{
if
(
!
pVgroup
->
vnodeGid
[
i
].
syncRestore
&&
!
pVgroup
->
vnodeGid
[
i
].
syncCanRead
)
{
star
=
"**"
;
}
else
if
(
!
pVgroup
->
vnodeGid
[
i
].
syncRestore
&&
pVgroup
->
vnodeGid
[
i
].
syncCanRead
)
{
star
=
"*"
;
}
else
{
}
}
snprintf
(
role
,
sizeof
(
role
),
"%s%s"
,
syncStr
(
pVgroup
->
vnodeGid
[
i
].
syncState
),
star
);
}
else
{
}
STR_WITH_MAXSIZE_TO_VARSTR
(
buf1
,
role
,
pShow
->
pMeta
->
pSchemas
[
cols
].
bytes
);
...
...
source/dnode/vnode/src/vnd/vnodeQuery.c
浏览文件 @
52443d34
...
...
@@ -380,6 +380,7 @@ int32_t vnodeGetLoad(SVnode *pVnode, SVnodeLoad *pLoad) {
pLoad
->
vgId
=
TD_VID
(
pVnode
);
pLoad
->
syncState
=
state
.
state
;
pLoad
->
syncRestore
=
state
.
restored
;
pLoad
->
syncCanRead
=
state
.
canRead
;
pLoad
->
cacheUsage
=
tsdbCacheGetUsage
(
pVnode
);
pLoad
->
numOfTables
=
metaGetTbNum
(
pVnode
->
pMeta
);
pLoad
->
numOfTimeSeries
=
metaGetTimeSeriesNum
(
pVnode
->
pMeta
);
...
...
source/dnode/vnode/src/vnd/vnodeSync.c
浏览文件 @
52443d34
...
...
@@ -515,7 +515,7 @@ void vnodeSyncPreClose(SVnode *pVnode) {
vInfo
(
"vgId:%d, pre close sync"
,
pVnode
->
config
.
vgId
);
syncLeaderTransfer
(
pVnode
->
sync
);
syncPreStop
(
pVnode
->
sync
);
#if 0
while (syncSnapshotRecving(pVnode->sync)) {
vInfo("vgId:%d, snapshot is recving", pVnode->config.vgId);
taosMsleep(300);
...
...
@@ -524,7 +524,7 @@ void vnodeSyncPreClose(SVnode *pVnode) {
vInfo("vgId:%d, snapshot is sending", pVnode->config.vgId);
taosMsleep(300);
}
#endif
taosThreadMutexLock
(
&
pVnode
->
lock
);
if
(
pVnode
->
blocked
)
{
vInfo
(
"vgId:%d, post block after close sync"
,
pVnode
->
config
.
vgId
);
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py
浏览文件 @
52443d34
...
...
@@ -62,7 +62,7 @@ class TDTestCase:
# only for 1 mnode
mnode_name
=
k
if
v
[
2
]
in
[
'leader'
,
'leader*'
]:
if
v
[
2
]
in
[
'leader'
,
'leader*'
,
'leader**'
]:
is_leader
=
True
if
count
==
1
and
is_leader
:
...
...
@@ -111,12 +111,12 @@ class TDTestCase:
vgroup_id
=
vgroup_info
[
0
]
tmp_list
=
[]
for
role
in
vgroup_info
[
3
:
-
4
]:
if
role
in
[
'leader'
,
'leader*'
,
'follower'
]:
if
role
in
[
'leader'
,
'leader*'
,
'
leader**'
,
'
follower'
]:
tmp_list
.
append
(
role
)
vgroups_infos
[
vgroup_id
]
=
tmp_list
for
k
,
v
in
vgroups_infos
.
items
():
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader*'
]:
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader*'
,
'leader**'
]:
tdLog
.
notice
(
" === create database replica only 1 role leader check success of vgroup_id {} ======"
.
format
(
k
))
else
:
tdLog
.
exit
(
" === create database replica only 1 role leader check fail of vgroup_id {} ======"
.
format
(
k
))
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py
浏览文件 @
52443d34
...
...
@@ -116,12 +116,12 @@ class TDTestCase:
vgroup_id
=
vgroup_info
[
0
]
tmp_list
=
[]
for
role
in
vgroup_info
[
3
:
-
4
]:
if
role
in
[
'leader'
,
'leader*'
,
'follower'
]:
if
role
in
[
'leader'
,
'leader*'
,
'leader**'
,
'follower'
]:
tmp_list
.
append
(
role
)
vgroups_infos
[
vgroup_id
]
=
tmp_list
for
k
,
v
in
vgroups_infos
.
items
():
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader
*'
]:
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader*'
,
'leader*
*'
]:
tdLog
.
notice
(
" === create database replica only 1 role leader check success of vgroup_id {} ======"
.
format
(
k
))
else
:
tdLog
.
notice
(
" === create database replica only 1 role leader check fail of vgroup_id {} ======"
.
format
(
k
))
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py
浏览文件 @
52443d34
...
...
@@ -117,12 +117,12 @@ class TDTestCase:
vgroup_id
=
vgroup_info
[
0
]
tmp_list
=
[]
for
role
in
vgroup_info
[
3
:
-
4
]:
if
role
in
[
'leader'
,
'leader*'
,
'follower'
]:
if
role
in
[
'leader'
,
'leader*'
,
'leader**'
,
'follower'
]:
tmp_list
.
append
(
role
)
vgroups_infos
[
vgroup_id
]
=
tmp_list
for
k
,
v
in
vgroups_infos
.
items
():
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader
*'
]:
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader*'
,
'leader*
*'
]:
tdLog
.
notice
(
" === create database replica only 1 role leader check success of vgroup_id {} ======"
.
format
(
k
))
else
:
tdLog
.
notice
(
" === create database replica only 1 role leader check fail of vgroup_id {} ======"
.
format
(
k
))
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py
浏览文件 @
52443d34
...
...
@@ -116,12 +116,12 @@ class TDTestCase:
vgroup_id
=
vgroup_info
[
0
]
tmp_list
=
[]
for
role
in
vgroup_info
[
3
:
-
4
]:
if
role
in
[
'leader'
,
'leader*'
,
'follower'
]:
if
role
in
[
'leader'
,
'leader*'
,
'leader**'
,
'follower'
]:
tmp_list
.
append
(
role
)
vgroups_infos
[
vgroup_id
]
=
tmp_list
for
k
,
v
in
vgroups_infos
.
items
():
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader
*'
]:
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader*'
,
'leader*
*'
]:
tdLog
.
notice
(
" === create database replica only 1 role leader check success of vgroup_id {} ======"
.
format
(
k
))
else
:
tdLog
.
notice
(
" === create database replica only 1 role leader check fail of vgroup_id {} ======"
.
format
(
k
))
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py
浏览文件 @
52443d34
...
...
@@ -117,12 +117,12 @@ class TDTestCase:
vgroup_id
=
vgroup_info
[
0
]
tmp_list
=
[]
for
role
in
vgroup_info
[
3
:
-
4
]:
if
role
in
[
'leader'
,
'leader*'
,
'follower'
]:
if
role
in
[
'leader'
,
'leader*'
,
'leader**'
,
'follower'
]:
tmp_list
.
append
(
role
)
vgroups_infos
[
vgroup_id
]
=
tmp_list
for
k
,
v
in
vgroups_infos
.
items
():
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader
*'
]:
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader*'
,
'leader*
*'
]:
tdLog
.
notice
(
" === create database replica only 1 role leader check success of vgroup_id {} ======"
.
format
(
k
))
else
:
tdLog
.
notice
(
" === create database replica only 1 role leader check fail of vgroup_id {} ======"
.
format
(
k
))
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py
浏览文件 @
52443d34
...
...
@@ -120,12 +120,12 @@ class TDTestCase:
vgroup_id
=
vgroup_info
[
0
]
tmp_list
=
[]
for
role
in
vgroup_info
[
3
:
-
4
]:
if
role
in
[
'leader'
,
'leader*'
,
'follower'
]:
if
role
in
[
'leader'
,
'leader*'
,
'leader**'
,
'follower'
]:
tmp_list
.
append
(
role
)
vgroups_infos
[
vgroup_id
]
=
tmp_list
for
k
,
v
in
vgroups_infos
.
items
():
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader
*'
]:
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader*'
,
'leader*
*'
]:
tdLog
.
notice
(
" === create database replica only 1 role leader check success of vgroup_id {} ======"
.
format
(
k
))
else
:
tdLog
.
exit
(
" === create database replica only 1 role leader check fail of vgroup_id {} ======"
.
format
(
k
))
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py
浏览文件 @
52443d34
...
...
@@ -120,12 +120,12 @@ class TDTestCase:
vgroup_id
=
vgroup_info
[
0
]
tmp_list
=
[]
for
role
in
vgroup_info
[
3
:
-
4
]:
if
role
in
[
'leader'
,
'leader*'
,
'follower'
]:
if
role
in
[
'leader'
,
'leader*'
,
'leader**'
,
'follower'
]:
tmp_list
.
append
(
role
)
vgroups_infos
[
vgroup_id
]
=
tmp_list
for
k
,
v
in
vgroups_infos
.
items
():
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader
*'
]:
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader*'
,
'leader*
*'
]:
tdLog
.
notice
(
" === create database replica only 1 role leader check success of vgroup_id {} ======"
.
format
(
k
))
else
:
tdLog
.
notice
(
" === create database replica only 1 role leader check fail of vgroup_id {} ======"
.
format
(
k
))
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py
浏览文件 @
52443d34
...
...
@@ -120,12 +120,12 @@ class TDTestCase:
vgroup_id
=
vgroup_info
[
0
]
tmp_list
=
[]
for
role
in
vgroup_info
[
3
:
-
4
]:
if
role
in
[
'leader'
,
'leader*'
,
'follower'
]:
if
role
in
[
'leader'
,
'leader*'
,
'leader**'
,
'follower'
]:
tmp_list
.
append
(
role
)
vgroups_infos
[
vgroup_id
]
=
tmp_list
for
k
,
v
in
vgroups_infos
.
items
():
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader
*'
]:
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader*'
,
'leader*
*'
]:
tdLog
.
notice
(
" === create database replica only 1 role leader check success of vgroup_id {} ======"
.
format
(
k
))
else
:
tdLog
.
notice
(
" === create database replica only 1 role leader check fail of vgroup_id {} ======"
.
format
(
k
))
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py
浏览文件 @
52443d34
...
...
@@ -125,12 +125,12 @@ class TDTestCase:
vgroup_id
=
vgroup_info
[
0
]
tmp_list
=
[]
for
role
in
vgroup_info
[
3
:
-
4
]:
if
role
in
[
'leader'
,
'leader*'
,
'follower'
]:
if
role
in
[
'leader'
,
'leader*'
,
'leader**'
,
'follower'
]:
tmp_list
.
append
(
role
)
vgroups_infos
[
vgroup_id
]
=
tmp_list
for
k
,
v
in
vgroups_infos
.
items
():
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader
*'
]:
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader*'
,
'leader*
*'
]:
tdLog
.
notice
(
" === create database replica only 1 role leader check success of vgroup_id {} ======"
.
format
(
k
))
else
:
tdLog
.
notice
(
" === create database replica only 1 role leader check fail of vgroup_id {} ======"
.
format
(
k
))
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py
浏览文件 @
52443d34
...
...
@@ -125,12 +125,12 @@ class TDTestCase:
vgroup_id
=
vgroup_info
[
0
]
tmp_list
=
[]
for
role
in
vgroup_info
[
3
:
-
4
]:
if
role
in
[
'leader'
,
'leader*'
,
'follower'
]:
if
role
in
[
'leader'
,
'leader*'
,
'leader**'
,
'follower'
]:
tmp_list
.
append
(
role
)
vgroups_infos
[
vgroup_id
]
=
tmp_list
for
k
,
v
in
vgroups_infos
.
items
():
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader
*'
]:
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader*'
,
'leader*
*'
]:
tdLog
.
notice
(
" === create database replica only 1 role leader check success of vgroup_id {} ======"
.
format
(
k
))
else
:
tdLog
.
notice
(
" === create database replica only 1 role leader check fail of vgroup_id {} ======"
.
format
(
k
))
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py
浏览文件 @
52443d34
...
...
@@ -125,12 +125,12 @@ class TDTestCase:
vgroup_id
=
vgroup_info
[
0
]
tmp_list
=
[]
for
role
in
vgroup_info
[
3
:
-
4
]:
if
role
in
[
'leader'
,
'leader*'
,
'follower'
]:
if
role
in
[
'leader'
,
'leader*'
,
'leader**'
,
'follower'
]:
tmp_list
.
append
(
role
)
vgroups_infos
[
vgroup_id
]
=
tmp_list
for
k
,
v
in
vgroups_infos
.
items
():
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader
*'
]:
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader*'
,
'leader*
*'
]:
tdLog
.
notice
(
" === create database replica only 1 role leader check success of vgroup_id {} ======"
.
format
(
k
))
else
:
tdLog
.
info
(
" === create database replica only 1 role leader check fail of vgroup_id {} ======"
.
format
(
k
))
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py
浏览文件 @
52443d34
...
...
@@ -208,12 +208,12 @@ class TDTestCase:
vgroup_id
=
vgroup_info
[
0
]
tmp_list
=
[]
for
role
in
vgroup_info
[
3
:
-
4
]:
if
role
in
[
'leader'
,
'leader*'
,
'follower'
]:
if
role
in
[
'leader'
,
'leader*'
,
'leader**'
,
'follower'
]:
tmp_list
.
append
(
role
)
vgroups_infos
[
vgroup_id
]
=
tmp_list
for
k
,
v
in
vgroups_infos
.
items
():
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader
*'
]:
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader*'
,
'leader*
*'
]:
tdLog
.
notice
(
" === create database replica only 1 role leader check success of vgroup_id {} ======"
.
format
(
k
))
else
:
tdLog
.
notice
(
" === create database replica only 1 role leader check fail of vgroup_id {} ======"
.
format
(
k
))
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py
浏览文件 @
52443d34
...
...
@@ -117,12 +117,12 @@ class TDTestCase:
vgroup_id
=
vgroup_info
[
0
]
tmp_list
=
[]
for
role
in
vgroup_info
[
3
:
-
4
]:
if
role
in
[
'leader'
,
'leader*'
,
'follower'
]:
if
role
in
[
'leader'
,
'leader*'
,
'leader**'
,
'follower'
]:
tmp_list
.
append
(
role
)
vgroups_infos
[
vgroup_id
]
=
tmp_list
for
k
,
v
in
vgroups_infos
.
items
():
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader
*'
]:
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader*'
,
'leader*
*'
]:
tdLog
.
notice
(
" === create database replica only 1 role leader check success of vgroup_id {} ======"
.
format
(
k
))
else
:
tdLog
.
exit
(
" === create database replica only 1 role leader check fail of vgroup_id {} ======"
.
format
(
k
))
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py
浏览文件 @
52443d34
...
...
@@ -116,12 +116,12 @@ class TDTestCase:
vgroup_id
=
vgroup_info
[
0
]
tmp_list
=
[]
for
role
in
vgroup_info
[
3
:
-
4
]:
if
role
in
[
'leader'
,
'leader*'
,
'follower'
]:
if
role
in
[
'leader'
,
'leader*'
,
'leader**'
,
'follower'
]:
tmp_list
.
append
(
role
)
vgroups_infos
[
vgroup_id
]
=
tmp_list
for
k
,
v
in
vgroups_infos
.
items
():
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader
*'
]:
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader*'
,
'leader*
*'
]:
tdLog
.
notice
(
" === create database replica only 1 role leader check success of vgroup_id {} ======"
.
format
(
k
))
else
:
tdLog
.
notice
(
" === create database replica only 1 role leader check fail of vgroup_id {} ======"
.
format
(
k
))
...
...
tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py
浏览文件 @
52443d34
...
...
@@ -119,12 +119,12 @@ class TDTestCase:
vgroup_id
=
vgroup_info
[
0
]
tmp_list
=
[]
for
role
in
vgroup_info
[
3
:
-
4
]:
if
role
in
[
'leader'
,
'leader*'
,
'follower'
]:
if
role
in
[
'leader'
,
'leader*'
,
'leader**'
,
'follower'
]:
tmp_list
.
append
(
role
)
vgroups_infos
[
vgroup_id
]
=
tmp_list
for
k
,
v
in
vgroups_infos
.
items
():
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader
*'
]:
if
len
(
v
)
==
1
and
v
[
0
]
in
[
'leader'
,
'leader*'
,
'leader*
*'
]:
tdLog
.
notice
(
" === create database replica only 1 role leader check success of vgroup_id {} ======"
.
format
(
k
))
else
:
tdLog
.
notice
(
" === create database replica only 1 role leader check fail of vgroup_id {} ======"
.
format
(
k
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录