未验证 提交 7dc8d4dc 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #3509 from taosdata/feature/crash_gen

Fixing crash_gen client side error
......@@ -1763,9 +1763,9 @@ class TaskCreateDb(StateTransitionTask):
return state.canCreateDb()
def _executeInternal(self, te: TaskExecutor, wt: WorkerThread):
# self.execWtSql(wt, "create database db replica {}".format(Dice.throw(3)+1))
self.execWtSql(wt, "create database db")
class TaskDropDb(StateTransitionTask):
@classmethod
def getEndState(cls):
......@@ -1832,7 +1832,7 @@ class TdSuperTable:
return dbc.query("SELECT * FROM db.{}".format(self._stName)) > 0
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
return
sql = "CREATE TABLE {} USING {} tags ({})".format(
......@@ -1916,9 +1916,9 @@ class TaskReadData(StateTransitionTask):
'max(speed)',
'first(speed)',
'last(speed)',
# 'top(speed)', # TODO: not supported?
# 'bottom(speed)', # TODO: not supported?
# 'percentile(speed, 10)', # TODO: TD-1316
'top(speed, 50)', # TODO: not supported?
'bottom(speed, 50)', # TODO: not supported?
'apercentile(speed, 10)', # TODO: TD-1316
'last_row(speed)',
# Transformation Functions
# 'diff(speed)', # TODO: no supported?!
......@@ -1928,7 +1928,9 @@ class TaskReadData(StateTransitionTask):
None
])
try:
# Run the query against the regular table first
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?!
dbc.execute("select {} from db.{}".format(aggExpr, sTable.getName()))
except taos.error.ProgrammingError as err:
......@@ -2022,7 +2024,7 @@ class TaskRestartService(StateTransitionTask):
return state.canDropFixedSuperTable() # Basicallly when we have the super table
return False # don't run this otherwise
CHANCE_TO_RESTART_SERVICE = 100
CHANCE_TO_RESTART_SERVICE = 200
def _executeInternal(self, te: TaskExecutor, wt: WorkerThread):
if not gConfig.auto_start_service: # only execute when we are in -a mode
print("_a", end="", flush=True)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册