[TD-4475] add manual test case for hot alter block
This commit is contained in:
parent
6439e9addc
commit
29ca859f11
|
@ -17,7 +17,8 @@ from util.cases import *
|
|||
from util.sql import *
|
||||
from util.dnodes import tdDnodes
|
||||
|
||||
|
||||
##TODO: auto test version is currently unsupported, need to come up with
|
||||
# an auto test version in the future
|
||||
class TDTestCase:
|
||||
def init(self, conn, logSql):
|
||||
tdLog.debug("start to execute %s" % __file__)
|
||||
|
@ -48,27 +49,33 @@ class TDTestCase:
|
|||
tdLog.info("taosd found in %s" % buildPath)
|
||||
binPath = buildPath+ "/build/bin/"
|
||||
|
||||
#alter cache block to 3, then check alter
|
||||
tdSql.execute('alter database db blocks 3')
|
||||
tdSql.query('show databases')
|
||||
tdSql.checkData(0,9,3)
|
||||
|
||||
os.system("%staosdemo -f tools/taosdemoAllTest/insert_5Mrows_noTB.json" % binPath)
|
||||
|
||||
#run taosdemo to occupy all cache, need to manually check memory consumption
|
||||
os.system("%staosdemo -f tools/taosdemoAllTest/manual_block1_comp.json" % binPath)
|
||||
input("please check memory usage for taosd. After checking, press enter")
|
||||
|
||||
#alter cache block to 8, then check alter
|
||||
tdSql.execute('alter database db blocks 8')
|
||||
tdSql.query('show databases')
|
||||
tdSql.checkData(0,9,8)
|
||||
tdDnodes.stop(1)
|
||||
tdDnodes.start(1)
|
||||
|
||||
os.system("%staosdemo -f tools/taosdemoAllTest/insert_5Mrows_hasTB.json" % binPath)
|
||||
|
||||
#run taosdemo to occupy all cache, need to manually check memory consumption
|
||||
os.system("%staosdemo -f tools/taosdemoAllTest/manual_block2.json" % binPath)
|
||||
input("please check memory usage for taosd. After checking, press enter")
|
||||
|
||||
##expected result the peak memory consumption should increase by around 80MB = 5 blocks of cache
|
||||
|
||||
##test results
|
||||
#2021/06/02 before:2621700K after: 2703640K memory usage increased by 80MB = 5 block
|
||||
# confirm with the change in block. Baosheng Chang
|
||||
|
||||
def stop(self):
|
||||
tdSql.close()
|
||||
tdLog.success("%s successfully executed" % __file__)
|
||||
tdLog.debug("%s alter block manual check finish" % __file__)
|
||||
|
||||
|
||||
tdCases.addWindows(__file__, TDTestCase())
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
"blocks": 3,
|
||||
"precision": "ms",
|
||||
"keep": 3650,
|
||||
"minRows": 100,
|
||||
"minRows": 1000,
|
||||
"maxRows": 4096,
|
||||
"comp":2,
|
||||
"walLevel":1,
|
||||
|
@ -40,7 +40,7 @@
|
|||
"batch_create_tbl_num": 20,
|
||||
"data_source": "rand",
|
||||
"insert_mode": "taosc",
|
||||
"insert_rows": 100000,
|
||||
"insert_rows": 10000,
|
||||
"childtable_limit": 10,
|
||||
"childtable_offset":100,
|
||||
"interlace_rows": 0,
|
||||
|
@ -53,8 +53,8 @@
|
|||
"sample_format": "csv",
|
||||
"sample_file": "./sample.csv",
|
||||
"tags_file": "",
|
||||
"columns": [{"type": "INT"}],
|
||||
"tags": [{"type": "TINYINT", "count":2}]
|
||||
"columns": [{"type": "INT"}, {"type": "DOUBLE", "count":10}, {"type": "BINARY", "len": 16, "count":3}, {"type": "BINARY", "len": 32, "count":6}],
|
||||
"tags": [{"type": "TINYINT", "count":2}, {"type": "BINARY", "len": 16, "count":5}]
|
||||
}]
|
||||
}]
|
||||
}
|
|
@ -19,7 +19,7 @@
|
|||
"replica": 1,
|
||||
"days": 10,
|
||||
"cache": 16,
|
||||
"blocks": 3,
|
||||
"blocks": 8,
|
||||
"precision": "ms",
|
||||
"keep": 3650,
|
||||
"minRows": 100,
|
Loading…
Reference in New Issue