[MDEV-29612] ReadViewBase::snapshot() misses an optimization Created: 2022-09-23  Updated: 2022-10-06  Resolved: 2022-10-06

Status: Closed
Project: MariaDB Server
Component/s: Storage Engine - InnoDB
Affects Version/s: 10.3, 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10
Fix Version/s: 10.6.11, 10.7.7, 10.8.6, 10.9.4, 10.10.2, 10.11.1

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Marko Mäkelä
Resolution: Fixed Votes: 1
Labels: performance

Issue Links:
Relates
relates to MDEV-15104 Remove trx_sys_t::rw_trx_ids and trx_... Closed
relates to MDEV-22593 InnoDB: don't take trx_sys.mutex in R... Closed

 Description   

While debugging MDEV-24402, I came across the following in ReadViewBase::snapshot():

(rr) p *this
$1 = {m_low_limit_id = 317, m_up_limit_id = 315, m_ids = std::vector of length 2, capacity 34 = {315, 316}, m_low_limit_no = 317}

This is equivalent to a read view where m_ids is empty and all other fields are 315.

An empty m_ids should make ReadViewBase::changes_visible() and ReadViewBase::append() faster.


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