mirror of
https://github.com/MariaDB/server.git
synced 2026-10-23 18:49:29 +03:00
innodb.innodb_buffer_pool_resize_temporary fails with (0/506)
The test reads innodb_buffer_pool_resize_status while the SET GLOBAL innodb_buffer_pool_size thread is blocked at buf_pool_shrink_before_wakeup and expects nothing withdrawn yet: Withdrawing blocks. (505/505). But buf_pool_t::resize() sets n_blocks_to_withdraw and first_to_withdraw and releases buf_pool.mutex before that sync point. From then on other threads withdraw blocks: allocate() from any page allocation, buf_LRU_block_free_non_file_page() on eviction, and the page cleaner LRU batch which evicts pages from the withdrawn area while to_withdraw is nonzero. So the first counter can be anything down to 0: Withdrawing blocks. (0/506). The fix masks the first counter in replace_regex, so the result does not depend on how many blocks were already withdrawn. This does not weaken the test: it still checks that the shrink is reported while in progress. How many blocks are already withdrawn at that moment depends only on timing.
This commit is contained in:
@@ -35,8 +35,9 @@ SET DEBUG_SYNC='buf_pool_shrink_before_wakeup SIGNAL blocked WAIT_FOR go';
|
||||
send SET GLOBAL innodb_buffer_pool_size=8388608;
|
||||
connection default;
|
||||
SET DEBUG_SYNC='now WAIT_FOR blocked';
|
||||
# adjust for 32-bit and SUX_LOCK_GENERIC
|
||||
--replace_regex /(5..)\/\1/505\/505/
|
||||
# adjust for 32-bit and SUX_LOCK_GENERIC; other threads may already
|
||||
# have withdrawn some blocks before buf_pool_shrink_before_wakeup
|
||||
--replace_regex /\([0-9]+\/5[0-9][0-9]\)/(505\/505)/
|
||||
SHOW STATUS LIKE 'innodb_buffer_pool_resize_status';
|
||||
SET DEBUG_SYNC='now SIGNAL go';
|
||||
connection con1;
|
||||
|
||||
Reference in New Issue
Block a user