Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
Description
If the InnoDB buffer pool contains many pages for a table or index that is being dropped or rebuilt, and if many of such pages are pointed to by the adaptive hash index, dropping the adaptive hash index may consume a lot of time.
The time-consuming operation of dropping the adaptive hash index entries is being executed while the InnoDB data dictionary cache dict_sys is exclusively locked.
(Data file deletion also takes place while the dictionary cache is locked. That is being covered by MDEV-8069.)
It is not actually necessary to drop all entries from the adaptive hash index when a table or index is being dropped or rebuilt. We can let the LRU replacement policy of the buffer pool take care of this gradually. For this to work, we must detach the dict_table_t and dict_index_t objects from the main dict_sys cache, and once the last adaptive hash index entry for the detached table is removed (when the garbage page is evicted from the buffer pool) we can free the dict_table_t and dict_index_t object.
Related to this, in MDEV-16283, we made ALTER TABLE...DISCARD TABLESPACE skip both the buffer pool eviction and the drop of the adaptive hash index. We shifted the burden to ALTER TABLE...IMPORT TABLESPACE or DROP TABLE. We can remove the eviction from DROP TABLE. We must retain the eviction in the ALTER TABLE...IMPORT TABLESPACE code path, so that in case the discarded table is being re-imported with the same tablespace identifier, the fresh data from the imported tablespace will replace any stale pages in the buffer pool.
Attachments
Issue Links
- causes
-
MDEV-22611 Assertion btr_search_enabled failed during buffer pool resizing
- Closed
-
MDEV-22790 Race between btr_page_mtr_lock() dropping AHI on the same block
- Closed
-
MDEV-23233 Race condition for btr_search_drop_page_hash_index() in buf_page_create()
- Closed
-
MDEV-23332 Assertion failure in file innobase/btr/btr0sea.cc, btr_search_drop_page_hash_index
- Closed
-
MDEV-23370 innodb_fts.innodb_fts_misc failed in buildbot, server crashed in dict_table_autoinc_destroy
- Closed
-
MDEV-23452 Assertion `buf_page_get_io_fix(bpage) == BUF_IO_NONE' failed in buf_page_set_sticky
- Closed
-
MDEV-25527 ERROR: AddressSanitizer: attempting double-free in __interceptor_free nearby dict_mem_table_free
- Closed
-
MDEV-26383 SUMMARY: AddressSanitizer: heap-use-after-free storage/innobase/btr/btr0sea.cc:209 in btr_search_lazy_free
- Closed
-
MDEV-27700 SUMMARY: AddressSanitizer: heap-use-after-free storage/innobase/btr/btr0sea.cc:1305 in btr_search_drop_page_hash_index(buf_block_t*)
- Closed
-
MDEV-29384 Hangs caused by innodb_adaptive_hash_index=ON
- Closed
-
MDEV-35049 fix innodb-adaptive-hash-index scalability with multiple threads
- In Testing
- is blocked by
-
MDEV-22523 index->rtr_ssn.mutex is wasting memory
- Closed
- relates to
-
MDEV-21936 Assertion `!btr_search_own_any(RW_LOCK_S)' failed in btr_search_drop_page_hash_index
- Closed
-
MDEV-23223 If you cancel CTAS Query on MariaDB Server, it will not be canceled and Rollback will be executed
- Closed
-
MDEV-23556 Truncate hangs InnoDB when innodb_safe_truncate is off
- Closed
-
MDEV-24188 Hang in buf_page_create() after reusing a previously freed page
- Closed
-
MDEV-24505 innodb.innodb-ucs2 test failed, assertion: list.count > 0, in file storage/innobase/include/ut0lst.h line 334
- Closed
-
MDEV-24863 InnoDB: Failing assertion: index == cursor->index in btr_search_update_hash_on_delete with innodb_evict_tables_on_commit_debug
- Closed
-
MDEV-8069 DROP or rebuild of a large table may lock up InnoDB
- Closed
-
MDEV-16283 ALTER TABLE...DISCARD TABLESPACE still takes long on a large buffer pool
- Closed
-
MDEV-26599 Assertion `!table->id' failed in btr_search_lazy_free
- Open
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...