[MDEV-20852] BtrBulk is unnecessarily holding dict_index_t::lock Created: 2019-10-17  Updated: 2019-10-17  Resolved: 2019-10-17

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.2.2, 10.3.0, 10.4.0
Fix Version/s: 10.2.28, 10.3.19, 10.4.9

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: upstream-fixed

Issue Links:
PartOf
is part of MDEV-20850 Merge new release of InnoDB 5.7.28 to... Closed

 Description   

The BtrBulk class, which was introduced in MySQL 5.7, is by design the exclusive writer to an index. It is therefore unnecessary to acquire the dict_index_t::lock in that code.

Holding the dict_index_t::lock would unnecessarily block other threads (SQL connections and the InnoDB purge threads) from buffering concurrent modifications to being-created secondary indexes.

This was addressed in MySQL 5.7.28 with a change that is still unnecessarily acquiring the dict_index_t::lock in some cases:
Bug #29008298 MYSQLD CRASHES ITSELF WHEN CREATING INDEX


Generated at Thu Feb 08 09:02:39 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.