[MDEV-15059] Misc small InnoDB scalability fixes Created: 2018-01-24  Updated: 2020-05-23  Resolved: 2018-03-21

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   

These fixes mostly about re-arrangined code, like moving things out of mutex. No functional changes, no big patches.

commit 8389b45b7fa1a2ddab64050b0be3cdb3e1a937c1
Author: Sergey Vojtovich <svoj@mariadb.org>
Date:   Mon Jan 22 23:58:52 2018 +0400
 
    MDEV-15059 - Misc small InnoDB scalability fixes
 
    Moved mutex locking inside lock_rec_lock().
    Moved monitor increment out of mutex.
    Moved assertions that don't require protection out of mutex.
    Removed duplicate assertions.
    Moved duplicate debug injections into lock_rec_lock().
    Let monitor updates use relaxed memory order.
    Return directly without maintaining variables in lock_rec_lock_slow().
    Moved lock_rec_lock_fast() body into lock_rec_lock(): saves at least one
    trx_mutex_enter(), one switch() plus some code was moved out of mutex.
 
commit 04996939106bd35a2e8737de35a912ccc6b53ba4
Author: Sergey Vojtovich <svoj@mariadb.org>
Date:   Tue Jan 23 13:23:35 2018 +0400
 
    MDEV-15059 - Misc small InnoDB scalability fixes
 
    Moved lock_rec_lock_slow() inside lock_rec_lock().
 
commit 064bd78038ca8d76ca1612d849ccdcbbe4324110
Author: Sergey Vojtovich <svoj@mariadb.org>
Date:   Wed Jan 24 22:10:16 2018 +0400
 
    MDEV-15059 - Misc small InnoDB scalability fixes
 
    When cloning oldest view, don't copy ReadView::m_creator_trx_id.
    It means that the owner thread is now allowed to access this member
    without trx_sys.mutex protection.
 
    To achieve this we have to keep ReadView::m_creator_trx_id in
    ReadView::m_ids. This is required to not let purge thread process
    records owned by transaction associated with oldest view.
 
    It is only required if trsanction entered read-write mode before it's
    view was created.
 
    If transaction entered read-write mode after it's view was created
    (trx_set_rw_mode()), purge thread won't be allowed to touch it because
    m_low_limit_id >= m_creator_trx_id holds. Thus we don't have to add
    this transaction id to ReadView::m_ids.
 
    Cleanups:
 
    ReadView::ids_t: don't seem to make any sense, just complicate matters.
 
    ReadView::copy_trx_ids(): doesn't make sense anymore, integrated into
    caller.
 
    ReadView::copy_complete(): not needed anymore.
 
    ReadView copy constructores: don't seem to make any sense.
 
    trx_purge_truncate_history(): removed view argument, access
    purge_sys->view directly instead.
 
commit 55277e8840f359ed36a99359a7e21f03af72a78a
Author: Sergey Vojtovich <svoj@mariadb.org>
Date:   Thu Jan 25 18:29:59 2018 +0400
 
    MDEV-15059 - Misc small InnoDB scalability fixes
 
    Form better trx_sys API.



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

Closing since the project is over.

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