MDEV-35189: Updating cache for INNODB_LOCKS et al is suboptimal #3584
+33
−142
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There are some performance issues with the cache that is underlying the
INFORMATION_SCHEMA
tablesINNODB_LOCKS
,INNODB_LOCK_WAITS
andINNODB_TRX
.ha_storage_put_memlim()
: Invokemy_crc32c()
just once to "fold".fold_lock()
: Remove some redundant conditions and usemy_crc32c()
instead ofut_fold_ulint_pair()
.add_lock_to_cache()
: Invokefold_lock()
only once.TODO (MDEV-35190): Combine
HASH_SEARCH
andHASH_INSERT
similar tobuf_pool.page_hash.cell_get()
.Release Notes
There performance of InnoDB hash table operations was slightly improved.
How can this PR be tested?
Basing the PR against the correct MariaDB version
main
branch.Some of this would be applicable to 10.5 as well, but we target 10.6 because of the MDEV-35190 dependency.
PR quality check