mariadb/storage/innobase
Marko Mäkelä 88733282fb MDEV-32050: Look up tables in the purge coordinator
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
2023-10-25 10:08:20 +03:00
..
btr Remove bogus references to replaced Google contributions 2023-08-21 15:51:16 +03:00
buf Merge 10.5 into 10.6 2023-10-23 16:43:48 +03:00
data Merge 10.4 into 10.5 2022-10-25 11:26:37 +03:00
dict MDEV-32050: Look up tables in the purge coordinator 2023-10-25 10:08:20 +03:00
eval MDEV-27336 Crash on DROP DATABASE due to out-of-bounds result from InnoDB SUBSTR() 2021-12-21 17:33:26 +02:00
fil Merge 10.5 into 10.6 2023-10-19 13:50:00 +03:00
fsp Merge 10.5 into 10.6 2023-10-19 13:50:00 +03:00
fts MDEV-32050: Look up tables in the purge coordinator 2023-10-25 10:08:20 +03:00
fut MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
gis MDEV-26827 Make page flushing even faster 2023-03-16 17:19:58 +02:00
ha
handler MDEV-32050: Improve srv_wake_purge_thread_if_not_active() 2023-10-25 09:38:21 +03:00
ibuf MDEV-32132 DROP INDEX followed by CREATE INDEX may corrupt data 2023-09-08 11:28:21 +03:00
include MDEV-32050: Look up tables in the purge coordinator 2023-10-25 10:08:20 +03:00
lock MDEV-32530 Race condition in lock_wait_rpl_report() 2023-10-24 14:33:14 +03:00
log Merge 10.5 into 10.6 2023-10-19 13:50:00 +03:00
mem MDEV-27058: Reduce the size of buf_block_t and buf_page_t 2021-11-18 17:47:19 +02:00
mtr MDEV-32552 Write-ahead logging is broken for freed pages 2023-10-23 16:13:16 +03:00
mysql-test/storage_engine
os Merge 10.5 into 10.6 2023-10-06 14:34:01 +03:00
page Merge 10.5 into 10.6 2023-04-11 16:15:19 +03:00
pars MDEV-13542: Crashing on corrupted page is unhelpful 2022-06-06 14:03:22 +03:00
que Merge 10.5 into 10.6 2023-03-28 15:25:52 +03:00
read MDEV-29612 ReadViewBase::snapshot() misses an optimization 2022-10-06 13:14:16 +03:00
rem Merge 10.5 into 10.6 2023-07-05 16:40:22 +03:00
row MDEV-32050: Look up tables in the purge coordinator 2023-10-25 10:08:20 +03:00
srv MDEV-32050: Look up tables in the purge coordinator 2023-10-25 10:08:20 +03:00
sync MDEV-29324 s390x patch srw_lock.cc 2023-09-07 01:45:49 -07:00
trx MDEV-32050: Look up tables in the purge coordinator 2023-10-25 10:08:20 +03:00
unittest MDEV-27956 hardware lock ellision on s390x/ppc64{,le} 2022-03-11 10:42:27 +11:00
ut Merge 10.5 into 10.6 2022-11-23 18:13:28 +02:00
.clang-format-old
bzip2.cmake
CMakeLists.txt Merge 10.5 into 10.6 2023-09-04 10:15:02 +03:00
COPYING.Google
COPYING.Percona
lz4.cmake
lzma.cmake
lzo.cmake
snappy.cmake