[MDEV-16678] Use MDL for innodb background threads instead of dict_operation_lock Created: 2018-07-03 Updated: 2021-09-30 Resolved: 2019-12-10 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Fix Version/s: | 10.5.1 |
| Type: | Task | Priority: | Critical |
| Reporter: | Thirunarayanan Balathandayuthapani | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 2 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Purge thread does take shared lock on innodb dictionary lock while processing the undo log record to avoid the dropping of table. But it also blocks DDL for Allow InnoDB background thread to take MDL lock on the table. In that case, it blocks DDL only for that table. For FOREIGN KEY constraint checks, we would prefer not to acquire dict_operation_lock S-latch, and rely on the correct acquisition of MDL on the SQL layer (to be covered by |
| Comments |
| Comment by Thirunarayanan Balathandayuthapani [ 2019-08-20 ] | |||||||||||||||||||||||
|
In `row_update_for_mysql()`, there is no need to take data dictionary lock to initialize fts_doc_id. Because marko mentioned that SQL layer takes MDL lock when foreign key | |||||||||||||||||||||||
| Comment by Matthias Leich [ 2019-11-15 ] | |||||||||||||||||||||||
|
| |||||||||||||||||||||||
| Comment by Matthias Leich [ 2019-11-18 ] | |||||||||||||||||||||||
|
| |||||||||||||||||||||||
| Comment by Matthias Leich [ 2019-11-19 ] | |||||||||||||||||||||||
|
| |||||||||||||||||||||||
| Comment by Matthias Leich [ 2019-11-25 ] | |||||||||||||||||||||||
|
| |||||||||||||||||||||||
| Comment by Matthias Leich [ 2019-11-27 ] | |||||||||||||||||||||||
|
| |||||||||||||||||||||||
| Comment by Marko Mäkelä [ 2019-12-05 ] | |||||||||||||||||||||||
|
I pushed some cleanup, mainly to the MDL acquisition code. axel, please run the normal R/W benchmarks on the branch and compare to the latest 10.5. We would like to ensure that there is no performance degradation for DML workloads. | |||||||||||||||||||||||
| Comment by Axel Schwenke [ 2019-12-10 ] | |||||||||||||||||||||||
|
I ran standard OLTP workloads. Numbers and diagrams attached in MDEV-16678.ods Observations:
|