Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
76bf908f
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看板
提交
76bf908f
编写于
9月 14, 2020
作者:
S
Steven Li
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed TD-1430 for the crash_gen tool, ensuring no client side error for the test
上级
3ea060e1
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
6 deletion
+8
-6
tests/pytest/crash_gen.py
tests/pytest/crash_gen.py
+8
-6
未找到文件。
tests/pytest/crash_gen.py
浏览文件 @
76bf908f
...
@@ -1763,7 +1763,7 @@ class TaskCreateDb(StateTransitionTask):
...
@@ -1763,7 +1763,7 @@ class TaskCreateDb(StateTransitionTask):
return
state
.
canCreateDb
()
return
state
.
canCreateDb
()
def
_executeInternal
(
self
,
te
:
TaskExecutor
,
wt
:
WorkerThread
):
def
_executeInternal
(
self
,
te
:
TaskExecutor
,
wt
:
WorkerThread
):
self
.
execWtSql
(
wt
,
"create database db
"
)
self
.
execWtSql
(
wt
,
"create database db
replica {}"
.
format
(
Dice
.
throw
(
3
)
+
1
)
)
class
TaskDropDb
(
StateTransitionTask
):
class
TaskDropDb
(
StateTransitionTask
):
...
@@ -1832,7 +1832,7 @@ class TdSuperTable:
...
@@ -1832,7 +1832,7 @@ class TdSuperTable:
return
dbc
.
query
(
"SELECT * FROM db.{}"
.
format
(
self
.
_stName
))
>
0
return
dbc
.
query
(
"SELECT * FROM db.{}"
.
format
(
self
.
_stName
))
>
0
def
ensureTable
(
self
,
dbc
:
DbConn
,
regTableName
:
str
):
def
ensureTable
(
self
,
dbc
:
DbConn
,
regTableName
:
str
):
sql
=
"select tbname from {} where tbname in ('{}')"
.
format
(
self
.
_stName
,
regTableName
)
sql
=
"select tbname from
db.
{} where tbname in ('{}')"
.
format
(
self
.
_stName
,
regTableName
)
if
dbc
.
query
(
sql
)
>=
1
:
# reg table exists already
if
dbc
.
query
(
sql
)
>=
1
:
# reg table exists already
return
return
sql
=
"CREATE TABLE {} USING {} tags ({})"
.
format
(
sql
=
"CREATE TABLE {} USING {} tags ({})"
.
format
(
...
@@ -1916,9 +1916,9 @@ class TaskReadData(StateTransitionTask):
...
@@ -1916,9 +1916,9 @@ class TaskReadData(StateTransitionTask):
'max(speed)'
,
'max(speed)'
,
'first(speed)'
,
'first(speed)'
,
'last(speed)'
,
'last(speed)'
,
# 'top(speed
)', # TODO: not supported?
'top(speed, 50
)'
,
# TODO: not supported?
# 'bottom(speed
)', # TODO: not supported?
'bottom(speed, 50
)'
,
# TODO: not supported?
# '
percentile(speed, 10)', # TODO: TD-1316
'a
percentile(speed, 10)'
,
# TODO: TD-1316
'last_row(speed)'
,
'last_row(speed)'
,
# Transformation Functions
# Transformation Functions
# 'diff(speed)', # TODO: no supported?!
# 'diff(speed)', # TODO: no supported?!
...
@@ -1928,7 +1928,9 @@ class TaskReadData(StateTransitionTask):
...
@@ -1928,7 +1928,9 @@ class TaskReadData(StateTransitionTask):
None
None
])
])
try
:
try
:
# Run the query against the regular table first
dbc
.
execute
(
"select {} from db.{}"
.
format
(
aggExpr
,
rTbName
))
dbc
.
execute
(
"select {} from db.{}"
.
format
(
aggExpr
,
rTbName
))
# Then run it against the super table
if
aggExpr
not
in
[
'stddev(speed)'
]:
#TODO: STDDEV not valid for super tables?!
if
aggExpr
not
in
[
'stddev(speed)'
]:
#TODO: STDDEV not valid for super tables?!
dbc
.
execute
(
"select {} from db.{}"
.
format
(
aggExpr
,
sTable
.
getName
()))
dbc
.
execute
(
"select {} from db.{}"
.
format
(
aggExpr
,
sTable
.
getName
()))
except
taos
.
error
.
ProgrammingError
as
err
:
except
taos
.
error
.
ProgrammingError
as
err
:
...
@@ -2022,7 +2024,7 @@ class TaskRestartService(StateTransitionTask):
...
@@ -2022,7 +2024,7 @@ class TaskRestartService(StateTransitionTask):
return
state
.
canDropFixedSuperTable
()
# Basicallly when we have the super table
return
state
.
canDropFixedSuperTable
()
# Basicallly when we have the super table
return
False
# don't run this otherwise
return
False
# don't run this otherwise
CHANCE_TO_RESTART_SERVICE
=
1
00
CHANCE_TO_RESTART_SERVICE
=
2
00
def
_executeInternal
(
self
,
te
:
TaskExecutor
,
wt
:
WorkerThread
):
def
_executeInternal
(
self
,
te
:
TaskExecutor
,
wt
:
WorkerThread
):
if
not
gConfig
.
auto_start_service
:
# only execute when we are in -a mode
if
not
gConfig
.
auto_start_service
:
# only execute when we are in -a mode
print
(
"_a"
,
end
=
""
,
flush
=
True
)
print
(
"_a"
,
end
=
""
,
flush
=
True
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录