mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 20:12:31 +01:00
88733282fb
The InnoDB table lookup in purge worker threads is a bottleneck that can degrade a slow shutdown to utilize less than 2 threads. Let us fix that bottleneck by constructing a local lookup table that does not require any synchronization while the undo log records of the current batch are being processed. TRX_PURGE_TABLE_BUCKETS: The initial number of std::unordered_map hash buckets used during a purge batch. This could avoid some resizing and rehashing in trx_purge_attach_undo_recs(). purge_node_t::tables: A lookup table from table ID to an already looked up and locked table. Replaces many fields. trx_purge_attach_undo_recs(): Look up each table in the purge batch only once. trx_purge(): Close all tables and release MDL at the end of the batch. trx_purge_table_open(), trx_purge_table_acquire(): Open a table in purge and acquire a metadata lock on it. This replaces dict_table_open_on_id<true>() and dict_acquire_mdl_shared(). purge_sys_t::close_and_reopen(): In case of an MDL conflict, close and reopen all tables that are covered by the current purge batch. It may be that some of the tables have been dropped meanwhile and can be ignored. This replaces wait_SYS() and wait_FTS(). row_purge_parse_undo_rec(): Make purge_coordinator_task issue a MDL warrant to any purge_worker_task which might need it when innodb_purge_threads>1. purge_node_t::end(): Clear the MDL warrant. Reviewed by: Vladislav Lesin and Vladislav Vaintroub |
||
---|---|---|
.. | ||
btr | ||
buf | ||
data | ||
dict | ||
eval | ||
fil | ||
fsp | ||
fts | ||
fut | ||
gis | ||
ha | ||
handler | ||
ibuf | ||
include | ||
lock | ||
log | ||
mem | ||
mtr | ||
mysql-test/storage_engine | ||
os | ||
page | ||
pars | ||
que | ||
read | ||
rem | ||
row | ||
srv | ||
sync | ||
trx | ||
unittest | ||
ut | ||
.clang-format-old | ||
bzip2.cmake | ||
CMakeLists.txt | ||
COPYING.Google | ||
COPYING.Percona | ||
lz4.cmake | ||
lzma.cmake | ||
lzo.cmake | ||
snappy.cmake |