diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-07-30 13:29:35 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-07-30 13:29:35 +0300 |
commit | a8642ba0072bc018c966dfa376de7c0190b23cd5 (patch) | |
tree | 7e051221bba66955fb12548aa8e6925fc0faeb3c /storage/maria/ma_commit.h | |
parent | c69286b73e4dec4d488fb2ad7a248a4905a5ec4b (diff) | |
download | mariadb-git-bb-10.6-MDEV-24258.tar.gz |
MDEV-24258 Merge dict_sys.mutex into dict_sys.latchbb-10.6-MDEV-24258
Thanks to the preparation, dict_sys.latch was only being
acquired in exclusive mode. Thus, it could theoretically
have been replaced with a mutex. But, we can do better
and merge dict_sys.mutex into dict_sys.latch. Generally,
every occurrence of dict_sys.mutex_lock() will be replaced
with dict_sys.lock().
Much of the current use of dict_sys.lock() will be replaced
with dict_sys.freeze(), which we will reintroduce for the
new shared mode.
The PERFORMANCE_SCHEMA instrumentation for dict_sys_mutex
will be removed along with dict_sys.mutex. The dict_sys.latch
will remain instrumented as dict_operation_lock.
As demonstrated by the test perfschema.sxlock_func, there
will be less contention on dict_sys.latch, because some previous
use of exclusive latches will be replaced with shared latches.
fts_parse_sql_no_dict_lock(): Replaced with pars_sql().
fts_get_table_name_prefix(): Merged to fts_optimize_create().
dict_stats_update_transient_for_index(): Deduplicated some code.
ha_innobase::info_low(), dict_stats_stop_bg(): Use a combination
of dict_sys.latch and table->stats_mutex_lock() to cover the
changes of BG_STAT_SHOULD_QUIT, because the flag is being read
in dict_stats_update_persistent() while not holding dict_sys.latch.
row_discard_tablespace_for_mysql(): Protect stats_bg_flag by
exclusive dict_sys.latch, like most other code does.
row_quiesce_table_has_fts_index(): Remove unnecessary mutex
acquisition. FLUSH TABLES...FOR EXPORT is protected by MDL.
row_import::set_root_by_heuristic(): Remove unnecessary mutex
acquisition. ALTER TABLE...IMPORT TABLESPACE is protected by MDL.
row_ins_sec_index_entry_low(): Replace a call
to dict_set_corrupted_index_cache_only(). Reads of index->type
were not really protected by dict_sys.mutex, and writes
(flagging an index corrupted) should be extremely rare.
Diffstat (limited to 'storage/maria/ma_commit.h')
0 files changed, 0 insertions, 0 deletions