Comment 7 for bug 1074255

Revision history for this message
yinfeng (yinfeng-zwx) wrote :

hi, Raghavendra D Prabhu
thanks for your reply.

I had tested PS5.5.28 and it really improved the performance of 'drop table' ( from minutes to seconds ).

Using innodb_lazy_drop_table should be a workaround too because it didn't call the function buf_LRU_invalidate_tablespace which was called by "drop table" thread to do some time-consuming work like this:

#0 0x00000000008a8c2d in buf_buddy_free_low ()
#1 0x00000000008150f4 in buf_LRU_block_remove_hashed_page ()
#2 0x0000000000817def in buf_LRU_invalidate_tablespace ()
#3 0x0000000000847cab in fil_delete_tablespace ()
#4 0x00000000007a606d in row_drop_table_for_mysql ()
#5 0x00000000007918ae in ha_innobase::delete_table(char const*) ()
#6 0x0000000000694c0e in ha_delete_table(THD*, handlerton*, char const*, char const*, char const*, bool) ()
#7 0x0000000000602e55 in mysql_rm_table_no_locks(THD*, TABLE_LIST*, bool, bool, bool, bool) ()
#8 0x00000000006034ad in mysql_rm_table(THD*, TABLE_LIST*, char, char) ()
#9 0x00000000005abd29 in mysql_execute_command(THD*) ()
#10 0x00000000005afaa8 in mysql_parse(THD*, char*, unsigned int, Parser_state*) ()
#11 0x00000000005b12c7 in dispatch_command(enum_server_command, THD*, char*, unsigned int) ()
#12 0x00000000006355ff in do_handle_one_connection(THD*) ()
#13 0x0000000000635700 in handle_one_connection ()
#14 0x0000000000900da6 in pfs_spawn_thread ()
#15 0x0000003888c077e1 in start_thread () from /lib64/libpthread.so.0
#16 0x00000038888e68ed in clone () from /lib64/libc.so.6

I also got some backtrace even with innodb_lazy_drop_table =1.

#0 0x00000000008a8c2d in buf_buddy_free_low ()
#1 0x0000000000815234 in buf_LRU_block_remove_hashed_page ()
#2 0x0000000000815fb3 in buf_LRU_free_block ()
#3 0x0000000000817143 in buf_LRU_search_and_free_block ()
#4 0x00000000008187bc in buf_LRU_get_free_block ()
#5 0x000000000080bf0e in buf_page_get_gen ()
#6 0x00000000007fdc58 in btr_search_drop_page_hash_when_freed ()
#7 0x000000000084c489 in fseg_free_extent ()
#8 0x000000000084d284 in fseg_free_step ()
#9 0x00000000007ec4a9 in btr_free_but_not_root ()
#10 0x000000000081d50e in dict_drop_index_tree ()
#11 0x00000000007b6035 in row_upd_clust_step ()
#12 0x00000000007b69de in row_upd_step ()
#13 0x0000000000899b88 in que_run_threads ()
#14 0x000000000089a286 in que_eval_sql ()
#15 0x00000000007a5ce9 in row_drop_table_for_mysql ()
#16 0x00000000007918ae in ha_innobase::delete_table(char const*) ()

both backtrace called the same function : buf_LRU_block_remove_hashed_page ->buf_LRU_block_remove_hashed_page

So I am not sure if this bug is related to http://bugs.mysql.com/bug.php?id=59727 which is still open.