Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
d796aaaa
T
TDengine
项目概览
慢慢CG
/
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看板
提交
d796aaaa
编写于
6月 30, 2020
作者:
S
Steven Li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Corrected TAOS client error detection
上级
d58434c3
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
15 addition
and
13 deletion
+15
-13
tests/pytest/crash_gen.py
tests/pytest/crash_gen.py
+15
-13
未找到文件。
tests/pytest/crash_gen.py
浏览文件 @
d796aaaa
...
...
@@ -292,7 +292,7 @@ class ThreadCoordinator:
logger
.
debug
(
"Main thread joining all threads"
)
self
.
_pool
.
joinAll
()
# Get all threads to finish
logger
.
info
(
"
All worker thread
finished"
)
logger
.
info
(
"
\n
All worker threads
finished"
)
self
.
_execStats
.
endExec
()
def
logStats
(
self
):
...
...
@@ -721,10 +721,10 @@ class StateHasData(AnyState):
self
.
assertNoTask
(
tasks
,
TaskDropDb
)
# we must have drop_db task
self
.
hasSuccess
(
tasks
,
TaskDropSuperTable
)
# self.assertAtMostOneSuccess(tasks, DropFixedSuperTableTask) # TODO: dicy
elif
(
newState
.
equals
(
AnyState
.
STATE_TABLE_ONLY
)
):
# data deleted
self
.
assertNoTask
(
tasks
,
TaskDropDb
)
self
.
assertNoTask
(
tasks
,
TaskDropSuperTable
)
self
.
assertNoTask
(
tasks
,
TaskAddData
)
#
elif ( newState.equals(AnyState.STATE_TABLE_ONLY) ): # data deleted
#
self.assertNoTask(tasks, TaskDropDb)
#
self.assertNoTask(tasks, TaskDropSuperTable)
#
self.assertNoTask(tasks, TaskAddData)
# self.hasSuccess(tasks, DeleteDataTasks)
else
:
# should be STATE_HAS_DATA
if
(
not
self
.
hasTask
(
tasks
,
TaskCreateDb
)
):
# only if we didn't create one
...
...
@@ -1014,9 +1014,9 @@ class Task():
self
.
_executeInternal
(
te
,
wt
)
# TODO: no return value?
except
taos
.
error
.
ProgrammingError
as
err
:
errno2
=
0x80000000
+
err
.
errno
# positive error number
if
(
errno2
in
[
0x200
,
0x360
,
0x362
,
0x36A
,
0x36B
,
0x3
81
,
0x380
,
0x38
3
,
0x600
])
:
# allowed errors
if
(
errno2
in
[
0x200
,
0x360
,
0x362
,
0x36A
,
0x36B
,
0x3
6D
,
0x381
,
0x380
,
0x383
,
0x50
3
,
0x600
])
:
# allowed errors
self
.
logDebug
(
"[=] Acceptable Taos library exception: errno=0x{:X}, msg: {}, SQL: {}"
.
format
(
errno2
,
err
,
self
.
_lastSql
))
print
(
"
e
"
,
end
=
""
,
flush
=
True
)
print
(
"
_
"
,
end
=
""
,
flush
=
True
)
self
.
_err
=
err
else
:
errMsg
=
"[=] Unexpected Taos library exception: errno=0x{:X}, msg: {}, SQL: {}"
.
format
(
errno2
,
err
,
self
.
_lastSql
)
...
...
@@ -1234,22 +1234,24 @@ class TaskDropSuperTable(StateTransitionTask):
tblSeq
=
list
(
range
(
2
+
(
self
.
LARGE_NUMBER_OF_TABLES
if
gConfig
.
larger_data
else
self
.
SMALL_NUMBER_OF_TABLES
)))
random
.
shuffle
(
tblSeq
)
tickOutput
=
False
# if we have spitted out a "d" character for "drop regular table"
isSuccess
=
True
for
i
in
tblSeq
:
regTableName
=
self
.
getRegTableName
(
i
);
# "db.reg_table_{}".format(i)
regTableName
=
self
.
getRegTableName
(
i
);
# "db.reg_table_{}".format(i)
try
:
nRows
=
self
.
execWtSql
(
wt
,
"drop table {}"
.
format
(
regTableName
))
self
.
execWtSql
(
wt
,
"drop table {}"
.
format
(
regTableName
))
# nRows always 0, like MySQL
except
taos
.
error
.
ProgrammingError
as
err
:
errno2
=
0x80000000
+
err
.
errno
# positive error number
if
(
errno2
in
[
0x362
])
:
# allowed errors
if
(
errno2
in
[
0x362
])
:
# mnode invalid table name
isSuccess
=
False
logger
.
debug
(
"[DB] Acceptable error when dropping a table"
)
continue
continue
# try to delete next regular table
if
(
not
tickOutput
):
tickOutput
=
True
# Print only one time
if
nRows
>=
1
:
if
isSuccess
:
print
(
"d"
,
end
=
""
,
flush
=
True
)
else
:
print
(
"f
({})"
.
format
(
nRows
)
,
end
=
""
,
flush
=
True
)
print
(
"f
"
,
end
=
""
,
flush
=
True
)
# Drop the super table itself
tblName
=
self
.
_dbManager
.
getFixedSuperTableName
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录