-
Paweł Olchawa authored
The assertion was supposed to check if there are no more transactions inside the mysql_trx_list, before the purge is requested to stop. The reason for that, was to ensure that InnoDB can provide a clean shutdown (with all transactions purged, when innodb_fast_shutdown = 0). However, it was executed before GTID persistor was stopped, so the GTID persistor background thread could still be active and it might had created a trx (and inserted into mysql_trx_list). That's how it was failing. This check should be moved forward - to after the GTID persistor is stopped (but still before purge is requested to stop). Actually, what really needs to be guarded, is that purge might be safe to shutdown cleanly, so the assertion is enough to be checked just before the purge is requested to stop. Also, it would be safer to make it debug-only assertion, because in case of bug and crash on assertion, it is much more risky to crash than to let it go (most likely the worst that could happen is that shutdown wouldn't be clean, which still seems safer than crashed InnoDB). Reviewed-by:
Debarun Banerjee <debarun.banerjee@oracle.com> RB: 25911
Paweł Olchawa authoredThe assertion was supposed to check if there are no more transactions inside the mysql_trx_list, before the purge is requested to stop. The reason for that, was to ensure that InnoDB can provide a clean shutdown (with all transactions purged, when innodb_fast_shutdown = 0). However, it was executed before GTID persistor was stopped, so the GTID persistor background thread could still be active and it might had created a trx (and inserted into mysql_trx_list). That's how it was failing. This check should be moved forward - to after the GTID persistor is stopped (but still before purge is requested to stop). Actually, what really needs to be guarded, is that purge might be safe to shutdown cleanly, so the assertion is enough to be checked just before the purge is requested to stop. Also, it would be safer to make it debug-only assertion, because in case of bug and crash on assertion, it is much more risky to crash than to let it go (most likely the worst that could happen is that shutdown wouldn't be clean, which still seems safer than crashed InnoDB). Reviewed-by:
Debarun Banerjee <debarun.banerjee@oracle.com> RB: 25911
Loading