1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-34753 memory pressure - erroneous termination condition

Fix race condition in test case by waiting for the expected state to occur.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
This commit is contained in:
Kristian Nielsen
2024-10-18 16:49:51 +02:00
committed by Daniel Black
parent eb29190398
commit abc46259c6
2 changed files with 53 additions and 25 deletions

View File

@ -38,11 +38,16 @@ let SEARCH_FILE= $MYSQLTEST_VARDIR/log/mysqld.1.err;
let SEARCH_PATTERN= [Mm]emory pressure.*;
--source include/search_pattern_in_file.inc
SELECT CAST(VARIABLE_VALUE AS INTEGER) < @dirty_prev AS LESS_DIRTY_IS_GOOD
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty';
# The garbage collection happens asynchronously after trigger, in a background
# thread. So wait for it to happen to avoid sporadic failure.
let $wait_condition=
SELECT CAST(VARIABLE_VALUE AS INTEGER) < @dirty_prev AS LESS_DIRTY_IS_GOOD
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
WHERE VARIABLE_NAME='Innodb_buffer_pool_pages_dirty';
--source include/wait_condition.inc
eval $wait_condition;
let SEARCH_PATTERN= InnoDB: Memory pressure event freed.*;
let SEARCH_WAIT= FOUND;
--source include/search_pattern_in_file.inc
set debug_dbug=@save_dbug;