tsbs icon indicating copy to clipboard operation
tsbs copied to clipboard

tsbs_load_clickhouse: The new version of ClickHouse no longer supports the old table creation statement

Open cocobond opened this issue 7 months ago • 0 comments

Reproduction problem steps:

1. clickhouse server deploy: docker run -d -it -p 8123:8123 -p 9000:9000 --name clickhouse clickhouse/clickhouse-server:25.4

2. tsbs_generate_data: ./tsbs_generate_data --use-case="cpu-only" --seed=123 --scale=100 --timestamp-start="2025-05-01T00:00:00Z" --timestamp-end="2025-05-02T00:00:00Z" --log-interval="10s" --file="/tsbs/test_sql/cpu_only_write.csv" --format="clickhouse"

3. tsbs_load_clickhouse: ./tsbs_load_clickhouse --file=/tsbs/test_sql/cpu_only_write.csv --urls=http://172.20.56.240:9000

Expected results:

Import normally, like ck readme.

Actual results

root@vm-239:/tsbs/tsbs/bin# ./tsbs_load_clickhouse   --file=/tsbs/test_sql/cpu_only_write.csv   --host=172.20.56.240
panic: code: 36, message: This syntax for *MergeTree engine is deprecated. Use extended storage definition syntax with ORDER BY/PRIMARY KEY clause. See also `allow_deprecated_syntax_for_merge_tree` setting.

goroutine 1 [running]:
github.com/timescale/tsbs/pkg/targets/clickhouse.createTagsTable(0xc00007e870, 0xc0001884b0, {0xc0001823c0?, 0xc0006000e0?, 0x1?}, {0xc000182460?, 0xc000133c38?, 0x7dc605?})
        /tsbs/tsbs/pkg/targets/clickhouse/creator.go:108 +0xdc
github.com/timescale/tsbs/pkg/targets/clickhouse.(*dbCreator).CreateDB(0xc00061a030, {0x89c299, 0x9})
        /tsbs/tsbs/pkg/targets/clickhouse/creator.go:83 +0x1d2
github.com/timescale/tsbs/load.(*CommonBenchmarkRunner).useDBCreator(0xc000124210, {0x94de38, 0xc00061a030})
        /tsbs/tsbs/load/loader.go:244 +0x1b1
github.com/timescale/tsbs/load.(*CommonBenchmarkRunner).preRun(0xc000124210, {0x94e378, 0xc000618000})
        /tsbs/tsbs/load/loader.go:128 +0x72
github.com/timescale/tsbs/load.(*CommonBenchmarkRunner).RunBenchmark(0xc000124210, {0x94e378?, 0xc000618000})
        /tsbs/tsbs/load/loader.go:184 +0x3f
main.main()
        /tsbs/tsbs/cmd/tsbs_load_clickhouse/main.go:55 +0x4c

When importing, the default table creation statement sql in TSBS has an error with the old syntax,

which means that it is impossible to make a native bench for clickhouse and it is necessary to manually support the old syntax of ck. I think this runs counter to the original intention of our TSBS. A clue worth mentioning is: I found that ck version 21.8.10.19 can succeed

cocobond avatar May 14 '25 05:05 cocobond