[MDEV-15019] InnoDB: store ReadView on trx Created: 2018-01-21  Updated: 2020-05-23  Resolved: 2018-01-22

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

Type: Task Priority: Major
Reporter: Sergey Vojtovich Assignee: Sergey Vojtovich
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
causes MDEV-22680 InnoDB trx_sys improvements Open
Epic Link: arm64 optimization

 Description   

This will allow us to reduce critical section protected by trx_sys.mutex:
1. no need to maintain global m_free list
2. eliminate if (trx->read_view == NULL) condition

On x86_64 sizeof(Readview) is 144 mostly due to padding, sizeof(trx_t) with ReadView is 1200.



 Comments   
Comment by Sergey Vojtovich [ 2018-01-21 ]

marko, please review https://github.com/MariaDB/server/commit/9f72798a8fe27fb06ceeb2f543c186ee8faa987a

Comment by Sergey Vojtovich [ 2018-01-22 ]

Pushed

commit 8e1adff95993effaa22129ff34b4570b755434ac
Author: Sergey Vojtovich <svoj@mariadb.org>
Date:   Sun Jan 21 14:10:06 2018 +0400
 
    Simplified away ReadView::complete()
 
    It was supposed to be called out of mutex, but nevertheless was called
    under trx_sys.mutex for normal threads adding one extra condtion in
    critical section.
 
commit 4dc30f3c170b9deab1ff0b472930baba5c65b01c
Author: Sergey Vojtovich <svoj@mariadb.org>
Date:   Sat Jan 20 17:45:42 2018 +0400
 
    MDEV-15019 - InnoDB: store ReadView on trx
 
    This will allow us to reduce critical section protected by
    trx_sys.mutex:
    - no need to maintain global m_free list
    - eliminate if (trx->read_view == NULL) condition.
 
    On x86_64 sizeof(Readview) is 144 mostly due to padding, sizeof(trx_t)
    with ReadView is 1200.
 
    Also don't close ReadView for read-write transactions, just mark it
    closed similarly to read-only.
 
    Clean-up: removed n_prepared_recovered_trx and n_prepared_trx, which
    accidentally re-appeared after some rebase.

Generated at Thu Feb 08 08:18:04 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.