mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
MDEV-24101 innodb_random_read_ahead=ON causes hang on DDL or shutdown
buf_read_ahead_random(): Do not leak a tablespace reference.
The reference was already acquired in fil_space_t::get(),
and we must only check that operations were not stopped.
This error was introduced when
commit 118e258aaa
merged n_pending_ios, n_pending_ops into a single n_pending.
This was not noticed earlier, because innodb_random_read_ahead
is OFF by default and our regression tests did not vary that
parameter at all.
This commit is contained in:
parent
95fcd567bd
commit
90f43d260e
2 changed files with 6 additions and 1 deletions
5
mysql-test/suite/innodb/t/foreign_key.combinations
Normal file
5
mysql-test/suite/innodb/t/foreign_key.combinations
Normal file
|
@ -0,0 +1,5 @@
|
|||
[read-ahead]
|
||||
--innodb-random-read-ahead=ON
|
||||
|
||||
[normal]
|
||||
--innodb-random-read-ahead=OFF
|
|
@ -431,7 +431,7 @@ no_read_ahead:
|
|||
return 0;
|
||||
|
||||
read_ahead:
|
||||
if (!space->acquire_if_not_stopped())
|
||||
if (space->is_stopping())
|
||||
goto no_read_ahead;
|
||||
|
||||
/* Read all the suitable blocks within the area */
|
||||
|
|
Loading…
Reference in a new issue