[MDEV-12121] Introduce build option WITH_INNODB_AHI to disable innodb_adaptive_hash_index Created: 2017-02-23 Updated: 2020-02-10 Resolved: 2017-03-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Fix Version/s: | 10.2.5 |
| Type: | Task | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | performance | ||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Description |
|
The InnoDB adaptive hash index is sometimes degrading the performance of InnoDB, and it is sometimes disabled to get more consistent performance. We should have a compile-time option to disable the adaptive hash index. Let us introduce two options:
And let us consistently enclose all dependent code in appropriate #ifdef. As part of this change, the misleadingly named function trx_search_latch_release_if_reserved(trx) will be replaced with the macro trx_assert_no_search_latch(trx) that will be empty unless BTR_CUR_HASH_ADAPT is defined (cmake -DWITH_INNODB_AHI=ON). We will remove the unused column INFORMATION_SCHEMA.INNODB_TRX.TRX_ADAPTIVE_HASH_TIMEOUT. Apart from the removal of the unused column, this is an almost non-functional change to the server when using the default build options, because WITH_INNODB_AHI will be ON by default. |
| Comments |
| Comment by Marko Mäkelä [ 2017-02-23 ] | |
|
1bc5c6127da MDEV-12121 Introduce build option WITH_INNODB_AHI to disable innodb_adaptive_hash_index | |
| Comment by Marko Mäkelä [ 2017-02-24 ] | |
|
bb-10.2-marko completed without any test failures. But, the additional patch for testing (changing the default to WITH_INNODB_AHI=OFF) also disabled some tests. A proper final version of this patch should probably remove the AHI-related columns from INFORMATION_SCHEMA.INNODB_* views and introduce something like
to conditionally disable these tests. Perhaps the affected tests should be split so that the AHI-dependent parts would be moved to separate test files. | |
| Comment by Jan Lindström (Inactive) [ 2017-03-01 ] | |
|
ok to push. | |
| Comment by Marko Mäkelä [ 2017-03-03 ] | |
|
I will wait for another buildbot round of bb-10.2-marko before pushing these to 10.2: |