• Sergey Vojtovich's avatar
    MDEV-22593 - InnoDB: don't take trx_sys.mutex in ReadView::open() · 50b0ce44
    Sergey Vojtovich authored
    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.
    50b0ce44
trx0trx.h 40.8 KB