[MDEV-13196] Remove handler::store_lock() Created: 2017-06-28 Updated: 2022-08-02 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Locking, Storage Engine - InnoDB |
| Fix Version/s: | 11.0 |
| Type: | Task | Priority: | Major |
| Reporter: | Sergey Vojtovich | Assignee: | Sergei Golubchik |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | deadlock | ||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
There's potential deadlock between "thread killing another thread that has open InnoDB HANDLER or delayed insert thread performing insert into InnoDB table" and "InnoDB service threads like srv_monitor_thread that calls thd_get_error_context_description". I doubt MariaDB is affected, because it does try_lock in thd_get_error_context_description, see 6e9a48b67fceab17089ca4cd1406e302386a601b. But anyway, since InnoDB doesn't use thr_lock anymore, it is probably a good idea to get rid of ha_innobase::store_lock() by moving some code to external_lock. Note: compared to store_lock external_lock can be called for temporary tables too. |
| Comments |
| Comment by Marko Mäkelä [ 2020-12-17 ] |
|
As far as I can tell, I think that it would be very welcome to remove ha_innobase::store_lock() and to simplify the locking logic. I wonder why that was not done when MDL was introduced. |