mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Improve 00738_lock_for_inner_table stability
A sufficiently fast machine would finish processing the MV before the drop
This commit is contained in:
parent
da988100d6
commit
d33a634014
@ -14,7 +14,8 @@ DROP TABLE IF EXISTS mv SYNC;
|
||||
-- create table with fsync and 20 partitions for slower INSERT
|
||||
-- (since increasing number of records will make it significantly slower in debug build, but not in release)
|
||||
CREATE TABLE tab_00738(a Int) ENGINE = MergeTree() ORDER BY a PARTITION BY a%20 SETTINGS fsync_after_insert=1;
|
||||
CREATE MATERIALIZED VIEW mv UUID '$uuid' ENGINE = Log AS SELECT a FROM tab_00738;" | ${CLICKHOUSE_CLIENT} -n
|
||||
-- The matview will take at least 2 seconds to be finished (10000000 * 0.0000002)
|
||||
CREATE MATERIALIZED VIEW mv UUID '$uuid' ENGINE = Log AS SELECT sleepEachRow(0.0000002) FROM tab_00738;" | ${CLICKHOUSE_CLIENT} -n
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query_id insert_$CLICKHOUSE_DATABASE --query "INSERT INTO tab_00738 SELECT number FROM numbers(10000000)" &
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user