List:Commits« Previous MessageNext Message »
From:vasil.dimov Date:December 16 2010 4:51pm
Subject:bzr push into mysql-trunk-innodb branch (vasil.dimov:3392 to 3393)
View as plain text  
 3393 Vasil Dimov	2010-12-16
      Remove stats locking from ha_innobase::info()
      
      This is a workaround for
      "Bug#58974 ha_innobase:info() tries to lock some latches even if
      HA_STATUS_NO_LOCK is given"
      to get into 5.6.1 because those locks are hurting performance badly.
      
      A better solution which does not allow inconsistent stats to be read
      into ha_innobase::stats is being baked in rb://540. Those locks were
      introduced recently. Before that the race has always exited. It is not a
      big problem to read inconsistent stats for a single query. The stats are
      just an estimates.

    modified:
      storage/innobase/handler/ha_innodb.cc
 3392 Inaam Rana	2010-12-16
      bug#58975
      Make sure that buf_flush_list() is called at least once in the
      page_cleaner code path before we wait on buf_flush_wait_batch_end().
      This ensures that buf_pool->no_flush[BUF_FLUSH_LIST] event will be
      set and the page_cleaner will not end up in infinite wait.
      This fix does that by changing the SRV_SHUTDOWN_CLEANUP while loop to
      a do..while loop.
      
      approved by: Marko

    modified:
      storage/innobase/buf/buf0flu.c
=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- a/storage/innobase/handler/ha_innodb.cc	revid:inaam.rana@stripped
+++ b/storage/innobase/handler/ha_innodb.cc	revid:vasil.dimov@stripped
@@ -8230,8 +8230,6 @@ ha_innobase::info_low(
 
 	if (flag & HA_STATUS_VARIABLE) {
 
-		dict_table_stats_lock(ib_table, RW_S_LATCH);
-
 		n_rows = ib_table->stat_n_rows;
 
 		/* Because we do not protect stat_n_rows by any mutex in a
@@ -8281,8 +8279,6 @@ ha_innobase::info_low(
 				ib_table->stat_sum_of_other_index_sizes)
 					* UNIV_PAGE_SIZE;
 
-		dict_table_stats_unlock(ib_table, RW_S_LATCH);
-
 		/* Since fsp_get_available_space_in_free_extents() is
 		acquiring latches inside InnoDB, we do not call it if we
 		are asked by MySQL to avoid locking. Another reason to
@@ -8354,8 +8350,6 @@ ha_innobase::info_low(
 					table->s->keys);
 		}
 
-		dict_table_stats_lock(ib_table, RW_S_LATCH);
-
 		for (i = 0; i < table->s->keys; i++) {
 			ulong	j;
 			/* We could get index quickly through internal
@@ -8417,8 +8411,6 @@ ha_innobase::info_low(
 				  (ulong) rec_per_key;
 			}
 		}
-
-		dict_table_stats_unlock(ib_table, RW_S_LATCH);
 	}
 
 	if (srv_force_recovery >= SRV_FORCE_NO_IBUF_MERGE) {

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-innodb branch (vasil.dimov:3392 to 3393) vasil.dimov16 Dec