mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
MDEV-22593 - InnoDB: don't take trx_sys.mutex in ReadView::open()
This was the last abuse of trx_sys.mutex, which is now exclusively protecting trx_sys.trx_list. This global acquisition was also potential scalability bottleneck for oltp_read_write benchmark. Although it didn't expose itself as such due to larger scalability issues. Replaced trx_sys.mutex based synchronisation between ReadView creator thread and purge coordinator thread performing latest view clone with ReadView::m_mutex. It also allowed to simplify tri-state view m_state down to boolean m_open flag. For performance reasons trx->read_view.close() is left as atomic relaxed store, so that we don't have to waste resources for otherwise meaningless mutex acquisition.
This commit is contained in:
parent
8569dac1ec
commit
50b0ce44a2
22 changed files with 265 additions and 320 deletions
|
|
@ -26,7 +26,7 @@ Created 3/26/1996 Heikki Tuuri
|
|||
|
||||
/**********************************************************************//**
|
||||
Determines if a transaction is in the given state.
|
||||
The caller must hold trx_sys.mutex, or it must be the thread
|
||||
The caller must hold trx->mutex, or it must be the thread
|
||||
that is serving a running transaction.
|
||||
A running RW transaction must be in trx_sys.rw_trx_hash.
|
||||
@return TRUE if trx->state == state */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue