diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2018-01-27 19:30:18 +0400 |
---|---|---|
committer | Sergey Vojtovich <svoj@mariadb.org> | 2018-01-31 15:18:21 +0400 |
commit | 53cc9aa5be63b4dd03aba804aebaa3bd470dab9c (patch) | |
tree | f6ceb3cbd4e2b2e16c575e363f583ecdc8837f41 /storage/innobase/ut | |
parent | af566d8a63f908c76d43957e790e861d944486b0 (diff) | |
download | mariadb-git-53cc9aa5be63b4dd03aba804aebaa3bd470dab9c.tar.gz |
MDEV-15104 - Remove trx_sys_t::rw_trx_ids
Take snapshot of registered read-write transaction identifiers directly
from rw_trx_hash. It immediately saves one trx_sys.mutex lock, reduces
size of another critical section protected by this mutex, and makes
further optimisations like removing trx_sys_t::serialisation_list
possible.
Downside of this approach is bigger overhead for view opening, because
iterating LF_HASH is more expensive compared to taking snapshot of an
array. However for low concurrency overhead difference is negligible,
while for high concurrency mutex is much bigger evil.
Currently we still take trx_sys.mutex to serialise ReadView creation.
This is required to keep serialisation_list ordered by trx->no as well
as not to let purge thread to create more recent snapshot while another
thread gets suspended during creation of older snapshot. This will
become completely mutex free along with serialisation_list removal.
Compared to previous implementation removing element from rw_trx_hash
and serialisation_list is not atomic. We disregard all possible bad
consequences (if there're any) since it will be solved along with
serialisation_list removal.
Diffstat (limited to 'storage/innobase/ut')
-rw-r--r-- | storage/innobase/ut/ut0new.cc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/storage/innobase/ut/ut0new.cc b/storage/innobase/ut/ut0new.cc index bf5515f4de0..1815c26a288 100644 --- a/storage/innobase/ut/ut0new.cc +++ b/storage/innobase/ut/ut0new.cc @@ -43,7 +43,6 @@ PSI_memory_key mem_key_other; PSI_memory_key mem_key_row_log_buf; PSI_memory_key mem_key_row_merge_sort; PSI_memory_key mem_key_std; -PSI_memory_key mem_key_trx_sys_t_rw_trx_ids; PSI_memory_key mem_key_partitioning; #ifdef UNIV_PFS_MEMORY @@ -72,7 +71,6 @@ static PSI_memory_info pfs_info[] = { {&mem_key_row_log_buf, "row_log_buf", 0}, {&mem_key_row_merge_sort, "row_merge_sort", 0}, {&mem_key_std, "std", 0}, - {&mem_key_trx_sys_t_rw_trx_ids, "trx_sys_t::rw_trx_ids", 0}, {&mem_key_partitioning, "partitioning", 0}, }; |