diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-04 16:18:04 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-12-15 17:56:17 +0200 |
commit | 38fd7b7d9170369b16ff553f01669182e70bc9b5 (patch) | |
tree | 97c806efbc1f53071a0d239ed43820b9c24cf5ae /storage/innobase/include/trx0sys.h | |
parent | 59b2848af6d71a4ffa849589adadfb69ed117b23 (diff) | |
download | mariadb-git-38fd7b7d9170369b16ff553f01669182e70bc9b5.tar.gz |
MDEV-21452: Replace all direct use of os_event_t
Let us replace os_event_t with mysql_cond_t, and replace the
necessary ib_mutex_t with mysql_mutex_t so that they can be
used with condition variables.
Also, let us replace polling (os_thread_sleep() or timed waits)
with plain mysql_cond_wait() wherever possible.
Furthermore, we will use the lightweight srw_mutex for trx_t::mutex,
to hopefully reduce contention on lock_sys.mutex.
FIXME: Add test coverage of
mariabackup --backup --kill-long-queries-timeout
Diffstat (limited to 'storage/innobase/include/trx0sys.h')
-rw-r--r-- | storage/innobase/include/trx0sys.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/include/trx0sys.h b/storage/innobase/include/trx0sys.h index ef23f620c49..d9707eae4ae 100644 --- a/storage/innobase/include/trx0sys.h +++ b/storage/innobase/include/trx0sys.h @@ -514,12 +514,12 @@ class rw_trx_hash_t ut_ad(!trx->read_only || !trx->rsegs.m_redo.rseg); ut_ad(!trx_is_autocommit_non_locking(trx)); /* trx->state can be anything except TRX_STATE_NOT_STARTED */ - mutex_enter(&trx->mutex); + ut_d(trx->mutex.wr_lock()); ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE) || trx_state_eq(trx, TRX_STATE_COMMITTED_IN_MEMORY) || trx_state_eq(trx, TRX_STATE_PREPARED_RECOVERED) || trx_state_eq(trx, TRX_STATE_PREPARED)); - mutex_exit(&trx->mutex); + ut_d(trx->mutex.wr_unlock()); } |