Skip to content

Commit

Permalink
MDEV-32798 innodb_fast_shutdown=0 hang after incomplete startup
Browse files Browse the repository at this point in the history
innodb_preshutdown(): Only wait for active transactions to be terminated
if InnoDB was started and innodb_force_recovery=3 or larger does not
prevent a rollback.

This fixes the following:

./mtr --parallel=auto --mysqld=--innodb-fast-shutdown=0 \
innodb.log_file_size innodb.innodb_force_recovery \
innodb.read_only_recovery innodb.read_only_recover_committed \
mariabackup.apply-log-only-incr
  • Loading branch information
dr-m committed Nov 14, 2023
1 parent 9f83a88 commit c638051
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion storage/innobase/srv/srv0start.cc
Expand Up @@ -1995,7 +1995,7 @@ void innodb_preshutdown()
better prevent any further changes from being buffered. */
innodb_change_buffering= 0;

if (trx_sys.is_initialised())
if (srv_force_recovery < SRV_FORCE_NO_TRX_UNDO && srv_was_started)
while (trx_sys.any_active_transactions())
os_thread_sleep(1000);
}
Expand Down

0 comments on commit c638051

Please sign in to comment.