Skip to content

Commit b21d0e7

Browse files
Merge pull request ClickHouse#63457 from canhld94/fix_test
Fix flaky test for rocksdb bulk sink
2 parents 37fe5da + a61cb62 commit b21d0e7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/queries/0_stateless/02956_rocksdb_bulk_sink.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ ${CLICKHOUSE_CLIENT} --query "SELECT count() FROM rocksdb_worm;"
2727

2828
# Testing insert with multiple sinks and fixed block size
2929
${CLICKHOUSE_CLIENT} --query "TRUNCATE TABLE rocksdb_worm;"
30-
${CLICKHOUSE_CLIENT} --query "ALTER TABLE rocksdb_worm MODIFY SETTING bulk_insert_block_size = 500000;"
31-
${CLICKHOUSE_CLIENT} --query "INSERT INTO rocksdb_worm SELECT number, number+1 FROM numbers_mt(1000000) SETTINGS max_insert_threads = 2, max_block_size = 100000;"
32-
${CLICKHOUSE_CLIENT} --query "SELECT sum(value) FROM system.rocksdb WHERE database = currentDatabase() AND table = 'rocksdb_worm' AND name = 'no.file.opens';" # should be 2 as max_block_size is set to 500000
30+
# Must set both max_threads and max_insert_threads to 2 to make sure there is only two sinks
31+
${CLICKHOUSE_CLIENT} --query "INSERT INTO rocksdb_worm SELECT number, number+1 FROM numbers_mt(1000000) SETTINGS max_threads = 2, max_insert_threads = 2, max_block_size = 10000, min_insert_block_size_rows = 0, min_insert_block_size_bytes = 0, insert_deduplication_token = '';"
32+
${CLICKHOUSE_CLIENT} --query "SELECT sum(value) FROM system.rocksdb WHERE database = currentDatabase() AND table = 'rocksdb_worm' AND name = 'no.file.opens';" # should be 2 because default bulk sink size is ~1M rows / SST file
3333
${CLICKHOUSE_CLIENT} --query "SELECT count() FROM rocksdb_worm;"
3434

3535
# Testing insert with duplicated keys

0 commit comments

Comments
 (0)