Browse Source

Follow-up to MDEV-12698: Adjust some comments

The function dict_stats_update_if_needed() replaced
row_update_statistics_if_needed(). Adjust the comments accordingly.
pull/555/head
Marko Mäkelä 8 years ago
parent
commit
8be7548085
  1. 4
      storage/innobase/dict/dict0stats_bg.cc
  2. 2
      storage/innobase/include/dict0mem.h
  3. 2
      storage/innobase/include/dict0stats.ic

4
storage/innobase/dict/dict0stats_bg.cc

@ -280,10 +280,10 @@ dict_stats_thread_init()
1) the background stats gathering thread before any other latch 1) the background stats gathering thread before any other latch
and released without latching anything else in between (thus and released without latching anything else in between (thus
any level would do here) any level would do here)
2) from row_update_statistics_if_needed()
2) from dict_stats_update_if_needed()
and released without latching anything else in between. We know and released without latching anything else in between. We know
that dict_sys->mutex (SYNC_DICT) is not acquired when that dict_sys->mutex (SYNC_DICT) is not acquired when
row_update_statistics_if_needed() is called and it may be acquired
dict_stats_update_if_needed() is called and it may be acquired
inside that function (thus a level <=SYNC_DICT would do). inside that function (thus a level <=SYNC_DICT would do).
3) from row_drop_table_for_mysql() after dict_sys->mutex (SYNC_DICT) 3) from row_drop_table_for_mysql() after dict_sys->mutex (SYNC_DICT)
and dict_operation_lock (SYNC_DICT_OPERATION) have been locked and dict_operation_lock (SYNC_DICT_OPERATION) have been locked

2
storage/innobase/include/dict0mem.h

@ -1581,7 +1581,7 @@ struct dict_table_t {
/** How many rows are modified since last stats recalc. When a row is /** How many rows are modified since last stats recalc. When a row is
inserted, updated, or deleted, we add 1 to this number; we calculate inserted, updated, or deleted, we add 1 to this number; we calculate
new estimates for the table and the indexes if the table has changed new estimates for the table and the indexes if the table has changed
too much, see row_update_statistics_if_needed(). The counter is reset
too much, see dict_stats_update_if_needed(). The counter is reset
to zero at statistics calculation. This counter is not protected by to zero at statistics calculation. This counter is not protected by
any latch, because this is only used for heuristics. */ any latch, because this is only used for heuristics. */
ib_uint64_t stat_modified_counter; ib_uint64_t stat_modified_counter;

2
storage/innobase/include/dict0stats.ic

@ -79,7 +79,7 @@ dict_stats_is_persistent_enabled(const dict_table_t* table)
protect the ::stat_persistent with dict_table_stats_lock() like the protect the ::stat_persistent with dict_table_stats_lock() like the
other ::stat_ members which would be too big performance penalty, other ::stat_ members which would be too big performance penalty,
especially when this function is called from especially when this function is called from
row_update_statistics_if_needed(). */
dict_stats_update_if_needed(). */
/* we rely on this read to be atomic */ /* we rely on this read to be atomic */
ib_uint32_t stat_persistent = table->stat_persistent; ib_uint32_t stat_persistent = table->stat_persistent;

Loading…
Cancel
Save