[MDEV-24731] Excessive mutex contention in DeadlockChecker::check_and_resolve() Created: 2021-01-29 Updated: 2021-06-14 Resolved: 2021-02-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.2, 10.3, 10.4, 10.5, 10.6 |
| Fix Version/s: | 10.6.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | performance | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
The function DeadlockChecker::check_and_resolve() is being executed while continuously holding lock_sys.mutex. Moving the deadlock detection to lock_wait() (which was refactored in It may also be possible to avoid holding lock_sys.mutex altogether, and instead only use lock_sys.wait_mutex and various trx_t::mutex. |
| Comments |
| Comment by Matthias Leich [ 2021-02-03 ] | |
|
| |
| Comment by Marko Mäkelä [ 2021-02-04 ] | |
|
Thank you, mleich! The branch included more changes than just this one. Most of the extra changes were for |