Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.5, 10.6, 10.11, 11.4
Description
The function trx_i_s_common_fill_table() is filling and using a common cache for the following views:
- INFORMATION_SCHEMA.INNODB_TRX
- INFORMATION_SCHEMA.INNODB_LOCKS
- INFORMATION_SCHEMA.INNODB_LOCK_WAITS
This may invoke the function add_lock_to_cache() several times, once for each qualifying lock. There are a few problems with this:
- The lock is first being searched for, to avoid duplicates. (Why not do this as part of the insert? Could we use std::unordered_map::emplace() with a custom allocator?)
- The function fold_lock() may be invoked unnecessarily many times. There is also a similar problem in ha_storage_put_memlim(). It could be better to use my_crc32c(), like we did in
MDEV-25905for another hash table. In that way, the inefficient and collision-prone ut_fold_ulint_pair() and ut_fold_binary() would only be used for backward compatibility in the following:- databases that were originally created with innodb_checksum_algorithm=innodb; the default was changed already in MySQL 5.6 and MariaDB Server 10.0
- the adaptive hash index functions dtuple_fold() and rec_fold(); changing that hash function might have an unpredictable performance impact
Attachments
Issue Links
- relates to
-
MDEV-35190 HASH_SEARCH() is duplicating effort before HASH_INSERT() or HASH_DELETE()
- Closed
-
MDEV-35049 fix innodb-adaptive-hash-index scalability with multiple threads
- In Review