fix: query mode forbid parallel running
This commit is contained in:
parent
677dbe4dd4
commit
3dc61016de
|
@ -20,16 +20,5 @@
|
||||||
"sql": "select last_row(*) from stb00_9 ",
|
"sql": "select last_row(*) from stb00_9 ",
|
||||||
"result": "./query_res1.txt"
|
"result": "./query_res1.txt"
|
||||||
}]
|
}]
|
||||||
},
|
|
||||||
"super_table_query": {
|
|
||||||
"stblname": "stb1",
|
|
||||||
"query_interval":20,
|
|
||||||
"threads": 4,
|
|
||||||
"sqls": [
|
|
||||||
{
|
|
||||||
"sql": "select last_row(ts) from xxxx",
|
|
||||||
"result": "./query_res2.txt"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"filetype": "query",
|
||||||
|
"cfgdir": "/etc/taos",
|
||||||
|
"host": "127.0.0.1",
|
||||||
|
"port": 6030,
|
||||||
|
"user": "root",
|
||||||
|
"password": "taosdata",
|
||||||
|
"confirm_parameter_prompt": "no",
|
||||||
|
"databases": "db",
|
||||||
|
"query_times": 1,
|
||||||
|
"super_table_query": {
|
||||||
|
"stblname": "stb1",
|
||||||
|
"query_interval":20,
|
||||||
|
"threads": 4,
|
||||||
|
"sqls": [
|
||||||
|
{
|
||||||
|
"sql": "select last_row(ts) from xxxx",
|
||||||
|
"result": "./query_res2.txt"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -22,17 +22,6 @@
|
||||||
"result": "./query_res1.txt"
|
"result": "./query_res1.txt"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"super_table_query": {
|
|
||||||
"stblname": "stb1",
|
|
||||||
"query_interval": 1,
|
|
||||||
"threads": 3,
|
|
||||||
"sqls": [
|
|
||||||
{
|
|
||||||
"sql": "select last_row(ts) from xxxx",
|
|
||||||
"result": "./query_res2.txt"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
{
|
||||||
|
"filetype": "query",
|
||||||
|
"cfgdir": "/etc/taos",
|
||||||
|
"host": "127.0.0.1",
|
||||||
|
"port": 6030,
|
||||||
|
"user": "root",
|
||||||
|
"password": "taosdata",
|
||||||
|
"confirm_parameter_prompt": "no",
|
||||||
|
"databases": "db",
|
||||||
|
"query_times": 2,
|
||||||
|
"query_mode": "rest",
|
||||||
|
"super_table_query": {
|
||||||
|
"stblname": "stb1",
|
||||||
|
"query_interval": 1,
|
||||||
|
"threads": 3,
|
||||||
|
"sqls": [
|
||||||
|
{
|
||||||
|
"sql": "select last_row(ts) from xxxx",
|
||||||
|
"result": "./query_res2.txt"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -22,16 +22,5 @@
|
||||||
"result": "./query_res1.txt"
|
"result": "./query_res1.txt"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
"super_table_query": {
|
|
||||||
"stblname": "stb1",
|
|
||||||
"query_interval": 1,
|
|
||||||
"threads": 3,
|
|
||||||
"sqls": [
|
|
||||||
{
|
|
||||||
"sql": "select last_row(ts) from xxxx",
|
|
||||||
"result": "./query_res2.txt"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"filetype": "query",
|
||||||
|
"cfgdir": "/etc/taos",
|
||||||
|
"host": "127.0.0.1",
|
||||||
|
"port": 6030,
|
||||||
|
"user": "root",
|
||||||
|
"password": "taosdata",
|
||||||
|
"confirm_parameter_prompt": "no",
|
||||||
|
"databases": "db",
|
||||||
|
"query_times": 2,
|
||||||
|
"query_mode": "taosc",
|
||||||
|
"super_table_query": {
|
||||||
|
"stblname": "stb1",
|
||||||
|
"query_interval": 1,
|
||||||
|
"threads": 3,
|
||||||
|
"sqls": [
|
||||||
|
{
|
||||||
|
"sql": "select last_row(ts) from xxxx",
|
||||||
|
"result": "./query_res2.txt"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -14,14 +14,5 @@
|
||||||
"sql": "select count(*) from db.stb",
|
"sql": "select count(*) from db.stb",
|
||||||
"result": "rest_query_specified"
|
"result": "rest_query_specified"
|
||||||
}]
|
}]
|
||||||
},
|
|
||||||
"super_table_query": {
|
|
||||||
"stblname": "stb",
|
|
||||||
"sqls": [
|
|
||||||
{
|
|
||||||
"sql": "select count(*) from xxxx",
|
|
||||||
"result": "rest_query_super"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"filetype":"query",
|
||||||
|
"cfgdir": "/etc/taos",
|
||||||
|
"confirm_parameter_prompt": "no",
|
||||||
|
"databases": "db",
|
||||||
|
"query_mode": "rest",
|
||||||
|
"connection_pool_size": 10,
|
||||||
|
"response_buffer": 10000,
|
||||||
|
"super_table_query": {
|
||||||
|
"stblname": "stb",
|
||||||
|
"sqls": [
|
||||||
|
{
|
||||||
|
"sql": "select count(*) from xxxx",
|
||||||
|
"result": "rest_query_super"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -18,16 +18,5 @@
|
||||||
"sql": "select count(*) from db.stb",
|
"sql": "select count(*) from db.stb",
|
||||||
"result": "taosc_query_specified"
|
"result": "taosc_query_specified"
|
||||||
}]
|
}]
|
||||||
},
|
|
||||||
"super_table_query": {
|
|
||||||
"stblname": "stb",
|
|
||||||
"query_interval": 1,
|
|
||||||
"concurrent": 1,
|
|
||||||
"sqls": [
|
|
||||||
{
|
|
||||||
"sql": "select count(*) from xxxx",
|
|
||||||
"result": "taosc_query_super"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"filetype":"query",
|
||||||
|
"cfgdir": "/etc/taos",
|
||||||
|
"host": "localhost",
|
||||||
|
"port": 6030,
|
||||||
|
"user": "root",
|
||||||
|
"password": "taosdata",
|
||||||
|
"confirm_parameter_prompt": "no",
|
||||||
|
"databases": "db",
|
||||||
|
"query_times": 1,
|
||||||
|
"reset_query_cache": "yes",
|
||||||
|
"super_table_query": {
|
||||||
|
"stblname": "stb",
|
||||||
|
"query_interval": 1,
|
||||||
|
"concurrent": 1,
|
||||||
|
"sqls": [
|
||||||
|
{
|
||||||
|
"sql": "select count(*) from xxxx",
|
||||||
|
"result": "taosc_query_super"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
|
@ -74,6 +74,9 @@ class TDTestCase:
|
||||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/taosc_query.json" %binPath
|
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/taosc_query.json" %binPath
|
||||||
tdLog.info("%s" % cmd)
|
tdLog.info("%s" % cmd)
|
||||||
os.system("%s" % cmd)
|
os.system("%s" % cmd)
|
||||||
|
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/taosc_query1.json" %binPath
|
||||||
|
tdLog.info("%s" % cmd)
|
||||||
|
os.system("%s" % cmd)
|
||||||
with open("%s" % "taosc_query_specified-0", 'r+') as f1:
|
with open("%s" % "taosc_query_specified-0", 'r+') as f1:
|
||||||
for line in f1.readlines():
|
for line in f1.readlines():
|
||||||
queryTaosc = line.strip().split()[0]
|
queryTaosc = line.strip().split()[0]
|
||||||
|
@ -84,9 +87,13 @@ class TDTestCase:
|
||||||
queryTaosc = line.strip().split()[0]
|
queryTaosc = line.strip().split()[0]
|
||||||
assert queryTaosc == '1', "result is %s != expect: 1" % queryTaosc
|
assert queryTaosc == '1', "result is %s != expect: 1" % queryTaosc
|
||||||
|
|
||||||
|
# split two
|
||||||
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/rest_query.json" %binPath
|
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/rest_query.json" %binPath
|
||||||
tdLog.info("%s" % cmd)
|
tdLog.info("%s" % cmd)
|
||||||
os.system("%s" % cmd)
|
os.system("%s" % cmd)
|
||||||
|
cmd = "%s -f ./5-taos-tools/taosbenchmark/json/rest_query1.json" %binPath
|
||||||
|
tdLog.info("%s" % cmd)
|
||||||
|
os.system("%s" % cmd)
|
||||||
|
|
||||||
times = 0
|
times = 0
|
||||||
with open("rest_query_super-0", 'r+') as f1:
|
with open("rest_query_super-0", 'r+') as f1:
|
||||||
|
|
|
@ -118,6 +118,8 @@ class TDTestCase:
|
||||||
# taosc query: query specified table and query super table
|
# taosc query: query specified table and query super table
|
||||||
os.system("%s -f ./5-taos-tools/taosbenchmark/json/queryInsertdata.json" % binPath)
|
os.system("%s -f ./5-taos-tools/taosbenchmark/json/queryInsertdata.json" % binPath)
|
||||||
os.system("%s -f ./5-taos-tools/taosbenchmark/json/queryTaosc.json" % binPath)
|
os.system("%s -f ./5-taos-tools/taosbenchmark/json/queryTaosc.json" % binPath)
|
||||||
|
# forbid parallel spec query with super query
|
||||||
|
os.system("%s -f ./5-taos-tools/taosbenchmark/json/queryTaosc1.json" % binPath)
|
||||||
os.system("cat query_res0.txt* > all_query_res0_taosc.txt")
|
os.system("cat query_res0.txt* > all_query_res0_taosc.txt")
|
||||||
os.system("cat query_res1.txt* > all_query_res1_taosc.txt")
|
os.system("cat query_res1.txt* > all_query_res1_taosc.txt")
|
||||||
os.system("cat query_res2.txt* > all_query_res2_taosc.txt")
|
os.system("cat query_res2.txt* > all_query_res2_taosc.txt")
|
||||||
|
@ -144,6 +146,7 @@ class TDTestCase:
|
||||||
# use restful api to query
|
# use restful api to query
|
||||||
os.system("%s -f ./5-taos-tools/taosbenchmark/json/queryInsertrestdata.json" % binPath)
|
os.system("%s -f ./5-taos-tools/taosbenchmark/json/queryInsertrestdata.json" % binPath)
|
||||||
os.system("%s -f ./5-taos-tools/taosbenchmark/json/queryRestful.json" % binPath)
|
os.system("%s -f ./5-taos-tools/taosbenchmark/json/queryRestful.json" % binPath)
|
||||||
|
os.system("%s -f ./5-taos-tools/taosbenchmark/json/queryRestful1.json" % binPath)
|
||||||
os.system("cat query_res0.txt* > all_query_res0_rest.txt")
|
os.system("cat query_res0.txt* > all_query_res0_rest.txt")
|
||||||
os.system("cat query_res1.txt* > all_query_res1_rest.txt")
|
os.system("cat query_res1.txt* > all_query_res1_rest.txt")
|
||||||
os.system("cat query_res2.txt* > all_query_res2_rest.txt")
|
os.system("cat query_res2.txt* > all_query_res2_rest.txt")
|
||||||
|
@ -191,6 +194,8 @@ class TDTestCase:
|
||||||
os.system("%s -f ./5-taos-tools/taosbenchmark/json/queryInsertdata.json" % binPath)
|
os.system("%s -f ./5-taos-tools/taosbenchmark/json/queryInsertdata.json" % binPath)
|
||||||
exceptcode = os.system("%s -f ./5-taos-tools/taosbenchmark/json/queryQps.json" % binPath)
|
exceptcode = os.system("%s -f ./5-taos-tools/taosbenchmark/json/queryQps.json" % binPath)
|
||||||
assert exceptcode == 0
|
assert exceptcode == 0
|
||||||
|
exceptcode = os.system("%s -f ./5-taos-tools/taosbenchmark/json/queryQps1.json" % binPath)
|
||||||
|
assert exceptcode == 0
|
||||||
|
|
||||||
# 2021.02.09 need modify taosBenchmakr code
|
# 2021.02.09 need modify taosBenchmakr code
|
||||||
# use illegal or out of range parameters query json file
|
# use illegal or out of range parameters query json file
|
||||||
|
|
Loading…
Reference in New Issue