Unnecessary AHI removal in buf_LRU_mark_space_was_deleted
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Server moved to https://jira.percona.com/projects/PS |
Fix Released
|
Low
|
Laurynas Biveinis | ||
5.1 |
Fix Released
|
Low
|
Laurynas Biveinis | ||
5.5 |
Fix Released
|
Low
|
Laurynas Biveinis |
Bug Description
Recently I am trying to understand the code path of "drop table".
buf_LRU_
chunk = buf_pool->chunks;
for (j = buf_pool->n_chunks; j--; chunk++) {
for (k = chunk->size; k--; block++) {
if (buf_block_
}
}
}
btr_search_
But before fil_delete_
I am not sure if the code quoted above is redundant.
Related branches
- Alexey Kopytov (community): Approve
-
Diff: 91 lines (+12/-27)1 file modifiedPercona-Server/storage/innodb_plugin/buf/buf0lru.c (+12/-27)
- Alexey Kopytov (community): Approve
-
Diff: 91 lines (+13/-27)1 file modifiedPercona-Server/storage/innobase/buf/buf0lru.c (+13/-27)
summary: |
- some confusing code in buf_LRU_mark_space_was_deleted + Unnecessary AHI scan in buf_LRU_mark_space_was_deleted |
@yinfeng,
I noticed that both the lazy / non-lazy implementations call btr_search_ drop_page_ hash_index
if (srv_lazy_ drop_table) { mark_space_ was_deleted( id); flush_or_ remove_ pages( ALL_NO_ WRITE FLUSH_NO_ WRITE);
buf_LRU_
} else {
buf_LRU_
id, evict_all
? BUF_REMOVE_
: BUF_REMOVE_
}
buf_LRU_ flush_or_ remove_ pages also calls it.
Regarding btr_search_ drop_page_ hash_when_ freed from fseg_free_extent I noticed that only dict_truncate_ index_tree makes call to it in row_truncate_ table_for_ mysql, though that is done after fil_discard_ tablespace
Can you tell us the call-path where you found duplicate calls to btr_search_ drop_page_ hash_when_ freed / btr_search_ drop_page_ hash_index (gdb bt with drop table should do)?