MDEV-18936 Purge thread fails to exit on shutdown
When there is a huge transaction in the undo log, the purge threads may get stuck in trx_purge_attach_undo_recs() for a long time, causing the server to hang on a normal shutdown (innodb_fast_shutdown>0). Apparently the innodb_purge_batch_size does not work correctly, or the n_pages_handled is not being incremented correctly. We do not fix that for now, but we will instead check if shutdown has been initiated, allowing the purge threads to shut down without delays.
This commit is contained in:
parent
396cf60ac0
commit
34db9958e2
@ -1,7 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, 2018, MariaDB Corporation.
|
||||
Copyright (c) 2017, 2019, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@ -989,7 +989,7 @@ trx_purge_attach_undo_recs(
|
||||
|
||||
i = 0;
|
||||
|
||||
for (;;) {
|
||||
while (UNIV_LIKELY(srv_undo_sources) || !srv_fast_shutdown) {
|
||||
purge_node_t* node;
|
||||
trx_purge_rec_t* purge_rec;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*****************************************************************************
|
||||
|
||||
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
|
||||
Copyright (c) 2017, 2018, MariaDB Corporation.
|
||||
Copyright (c) 2017, 2019, MariaDB Corporation.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
@ -989,7 +989,7 @@ trx_purge_attach_undo_recs(
|
||||
|
||||
i = 0;
|
||||
|
||||
for (;;) {
|
||||
while (UNIV_LIKELY(srv_undo_sources) || !srv_fast_shutdown) {
|
||||
purge_node_t* node;
|
||||
trx_purge_rec_t* purge_rec;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user