mirror of
https://github.com/MariaDB/server.git
synced 2026-05-14 19:07:15 +02:00
MDEV-15612 - Latching violation in trx_roll_must_shutdown
recv_sys_t::mutex and rw_trx_hash_elementi_t::mutex were acquired in reverse (to recorded) order. Fixed by releasing recv_sys_t::mutex, before iterating rw_trx_hash. Statistics gathering doesn't really need recv_sys_t::mutex protection, since it is always done in one thread (trx_roll_crash_recv_trx) and thus it can't go wrong.
This commit is contained in:
parent
2a13b3db50
commit
b36da48ad3
1 changed files with 3 additions and 3 deletions
|
|
@ -737,8 +737,10 @@ trx_roll_must_shutdown()
|
|||
|
||||
ib_time_t time = ut_time();
|
||||
mutex_enter(&recv_sys->mutex);
|
||||
bool report = recv_sys->report(time);
|
||||
mutex_exit(&recv_sys->mutex);
|
||||
|
||||
if (recv_sys->report(time)) {
|
||||
if (report) {
|
||||
trx_roll_count_callback_arg arg;
|
||||
|
||||
/* Get number of recovered active transactions and number of
|
||||
|
|
@ -752,8 +754,6 @@ trx_roll_must_shutdown()
|
|||
sd_notifyf(0, "STATUS=To roll back: " UINT32PF " transactions,"
|
||||
" " UINT64PF " rows", arg.n_trx, arg.n_rows);
|
||||
}
|
||||
|
||||
mutex_exit(&recv_sys->mutex);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue