[MDEV-12266] Reduce the number of InnoDB tablespace lookups Created: 2017-03-15  Updated: 2024-01-30  Resolved: 2018-03-29

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Fix Version/s: 10.3.6

Type: Task Priority: Major
Reporter: Rasmus Johansson (Inactive) Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Blocks
blocks MDEV-15983 Reduce fil_system.mutex contention fu... Closed
blocks MDEV-25312 Remove fil_space_t::name and related ... Closed
Problem/Incident
causes MDEV-15767 innodb.101_compatibility fails on bui... Closed
Relates
relates to MDEV-21563 FTS thread aborts during shutdown Closed
Sprint: 10.3.6-1

 Description   

InnoDB used to hide the definition of fil_space_t and use numeric tablespace ID everywhere. This causes a large number of tablespace lookups and thus contention on the fil_system->mutex.

We should store fil_space_t* where possible to reduce the number of tablespace lookups:

  • fil_system->sys_space for the innodb_system tablespace
  • fil_system->temp_space for the innodb_temporary tablespace
  • dict_table_t::space for user tables
  • optionally, rseg_t::space for rollback segment header pages and and undo logs

Also, we should use atomic memory access in fil_space_release() and avoid acquiring the mutex there. Furthermore, some accessor functions, such as fil_space_get_type() and fil_space_get_first_path() must be removed.



 Comments   
Comment by Marko Mäkelä [ 2018-03-28 ]

bb-10.3-marko (23 commits)

Comment by Thirunarayanan Balathandayuthapani [ 2018-03-29 ]

Patch looks OK

Generated at Thu Feb 08 07:56:24 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.