diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2018-02-22 20:46:42 +0400 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-02-23 08:18:18 +0200 |
commit | 131d9a5d0cb51fa88a0461c939dfd2a7c68d5664 (patch) | |
tree | 630ff855ce9ff0b11d80034f5a0ff0fbfd866e99 /storage/innobase/include/trx0sys.h | |
parent | 59dd0464a9fd58f6e7e65f6ffdbaf182b2cb13c2 (diff) | |
download | mariadb-git-131d9a5d0cb51fa88a0461c939dfd2a7c68d5664.tar.gz |
Allocate lock_sys statically
There is only one lock_sys. Allocate it statically in order to avoid
dereferencing a pointer whenever accessing it. Also, align some
members to their own cache line in order to avoid false sharing.
lock_sys_t::create(): The deferred constructor.
lock_sys_t::close(): The early destructor.
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 1013df88e49..00f245a05c0 100644 --- a/storage/innobase/include/trx0sys.h +++ b/storage/innobase/include/trx0sys.h @@ -590,10 +590,10 @@ public: the transaction may get committed before this method returns. With do_ref_count == false the caller may dereference returned trx pointer - only if lock_sys->mutex was acquired before calling find(). + only if lock_sys.mutex was acquired before calling find(). With do_ref_count == true caller may dereference trx even if it is not - holding lock_sys->mutex. Caller is responsible for calling + holding lock_sys.mutex. Caller is responsible for calling trx->release_reference() when it is done playing with trx. Ideally this method should get caller rw_trx_hash_pins along with trx |