Skip to content

Commit

Permalink
Merge pull request #35249 from azat/fix-01506_buffer_table_alter_bloc…
Browse files Browse the repository at this point in the history
…k_structure_2

Fix possible 01506_buffer_table_alter_block_structure_2 flakiness
  • Loading branch information
alexey-milovidov committed Mar 14, 2022
2 parents ded4c84 + 619bed4 commit eb11929
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ CREATE TABLE buf_dest (timestamp DateTime)
ENGINE = MergeTree PARTITION BY toYYYYMMDD(timestamp)
ORDER BY (timestamp);

CREATE TABLE buf (timestamp DateTime) Engine = Buffer(currentDatabase(), buf_dest, 16, 0.1, 0.1, 2000000, 20000000, 100000000, 300000000);;
CREATE TABLE buf (timestamp DateTime) Engine = Buffer(currentDatabase(), buf_dest, 16, 86400, 86400, 2000000, 20000000, 100000000, 300000000);;

INSERT INTO buf (timestamp) VALUES (toDateTime('2020-01-01 00:05:00'));

--- wait for buffer to flush
SELECT sleep(1) from numbers(1) settings max_block_size=1 format Null;
OPTIMIZE TABLE buf;

ALTER TABLE buf_dest ADD COLUMN s String;
ALTER TABLE buf ADD COLUMN s String;
Expand Down

0 comments on commit eb11929

Please sign in to comment.