Merge pull request #66771 from Algunenano/async_flaky

Fix flakiness of async insert tests due to adaptive timeout
This commit is contained in:
Alexey Milovidov 2024-07-19 22:26:42 +00:00 committed by GitHub
commit 54b1bcf019
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 8 additions and 6 deletions

View File

@ -6,7 +6,8 @@ CREATE TABLE t_async_inserts_flush (a UInt64) ENGINE = Memory;
SET async_insert = 1; SET async_insert = 1;
SET wait_for_async_insert = 0; SET wait_for_async_insert = 0;
SET async_insert_busy_timeout_min_ms = 1000000; -- Disable adaptive timeout to prevent immediate push of the first message (if the queue last push was old)
SET async_insert_use_adaptive_busy_timeout=0;
SET async_insert_busy_timeout_max_ms = 10000000; SET async_insert_busy_timeout_max_ms = 10000000;
INSERT INTO t_async_inserts_flush VALUES (1) (2); INSERT INTO t_async_inserts_flush VALUES (1) (2);

View File

@ -1,5 +1,5 @@
4 pending to flush 4
1 1
1 1
2 2
1 flush queries 1

View File

@ -9,7 +9,8 @@ ORDER BY id;
SET async_insert = 1; SET async_insert = 1;
SET async_insert_deduplicate = 1; SET async_insert_deduplicate = 1;
SET wait_for_async_insert = 0; SET wait_for_async_insert = 0;
SET async_insert_busy_timeout_min_ms = 100000; -- Disable adaptive timeout to prevent immediate push of the first message (if the queue last push was old)
SET async_insert_use_adaptive_busy_timeout=0;
SET async_insert_busy_timeout_max_ms = 1000000; SET async_insert_busy_timeout_max_ms = 1000000;
SET insert_deduplication_token = '1'; SET insert_deduplication_token = '1';
@ -30,7 +31,7 @@ INSERT INTO t_async_insert_skip_settings VALUES (2);
SYSTEM FLUSH LOGS; SYSTEM FLUSH LOGS;
SELECT length(entries.bytes) FROM system.asynchronous_inserts SELECT 'pending to flush', length(entries.bytes) FROM system.asynchronous_inserts
WHERE database = currentDatabase() AND table = 't_async_insert_skip_settings' WHERE database = currentDatabase() AND table = 't_async_insert_skip_settings'
ORDER BY first_update; ORDER BY first_update;
@ -40,7 +41,7 @@ SELECT * FROM t_async_insert_skip_settings ORDER BY id;
SYSTEM FLUSH LOGS; SYSTEM FLUSH LOGS;
SELECT uniqExact(flush_query_id) FROM system.asynchronous_insert_log SELECT 'flush queries', uniqExact(flush_query_id) FROM system.asynchronous_insert_log
WHERE database = currentDatabase() AND table = 't_async_insert_skip_settings'; WHERE database = currentDatabase() AND table = 't_async_insert_skip_settings';
DROP TABLE t_async_insert_skip_settings SYNC; DROP TABLE t_async_insert_skip_settings SYNC;