Skip to content

Commit

Permalink
Removed purge_trx_id_age and purge_view_trx_id_age
Browse files Browse the repository at this point in the history
These were unused status variables available in debug builds only.
Also removed trx_sys.rw_max_trx_id: not used anymore.
  • Loading branch information
Sergey Vojtovich committed Jan 20, 2018
1 parent db5bb78 commit 64048ba
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 54 deletions.
4 changes: 0 additions & 4 deletions storage/innobase/handler/ha_innodb.cc
Expand Up @@ -1048,10 +1048,6 @@ static SHOW_VAR innodb_status_variables[]= {
{"available_undo_logs",
(char*) &export_vars.innodb_available_undo_logs, SHOW_LONG},
#ifdef UNIV_DEBUG
{"purge_trx_id_age",
(char*) &export_vars.innodb_purge_trx_id_age, SHOW_LONG},
{"purge_view_trx_id_age",
(char*) &export_vars.innodb_purge_view_trx_id_age, SHOW_LONG},
{"ahi_drop_lookups",
(char*) &export_vars.innodb_ahi_drop_lookups, SHOW_LONG},
#endif /* UNIV_DEBUG */
Expand Down
3 changes: 0 additions & 3 deletions storage/innobase/include/srv0srv.h
Expand Up @@ -1018,9 +1018,6 @@ struct export_var_t{
ulint innodb_onlineddl_pct_progress; /*!< Online alter progress */

#ifdef UNIV_DEBUG
ulint innodb_purge_trx_id_age; /*!< rw_max_trx_id - purged trx_id */
ulint innodb_purge_view_trx_id_age; /*!< rw_max_trx_id
- purged view's min trx_id */
ulint innodb_ahi_drop_lookups; /*!< number of adaptive hash
index lookups when freeing
file pages */
Expand Down
4 changes: 0 additions & 4 deletions storage/innobase/include/trx0sys.h
Expand Up @@ -835,10 +835,6 @@ struct trx_sys_t {
trx_ut_list_t serialisation_list;
/*!< Ordered on trx_t::no of all the
currenrtly active RW transactions */
#ifdef UNIV_DEBUG
trx_id_t rw_max_trx_id; /*!< Max trx id of read-write
transactions which exist or existed */
#endif /* UNIV_DEBUG */

MY_ALIGNED(CACHE_LINE_SIZE)
trx_ut_list_t mysql_trx_list; /*!< List of transactions created
Expand Down
26 changes: 0 additions & 26 deletions storage/innobase/srv/srv0srv.cc
Expand Up @@ -1632,32 +1632,6 @@ srv_export_innodb_status(void)
export_vars.innodb_onlineddl_rowlog_pct_used = onlineddl_rowlog_pct_used;
export_vars.innodb_onlineddl_pct_progress = onlineddl_pct_progress;

#ifdef UNIV_DEBUG
rw_lock_s_lock(&purge_sys->latch);
trx_id_t up_limit_id = purge_sys->view.up_limit_id();;
trx_id_t done_trx_no = purge_sys->done.trx_no;
rw_lock_s_unlock(&purge_sys->latch);

mutex_enter(&trx_sys.mutex);
trx_id_t max_trx_id = trx_sys.rw_max_trx_id;
mutex_exit(&trx_sys.mutex);

if (!done_trx_no || max_trx_id < done_trx_no - 1) {
export_vars.innodb_purge_trx_id_age = 0;
} else {
export_vars.innodb_purge_trx_id_age =
(ulint) (max_trx_id - done_trx_no + 1);
}

if (!up_limit_id
|| max_trx_id < up_limit_id) {
export_vars.innodb_purge_view_trx_id_age = 0;
} else {
export_vars.innodb_purge_view_trx_id_age =
(ulint) (max_trx_id - up_limit_id);
}
#endif /* UNIV_DEBUG */

export_vars.innodb_sec_rec_cluster_reads =
srv_stats.n_sec_rec_cluster_reads;
export_vars.innodb_sec_rec_cluster_reads_avoided =
Expand Down
1 change: 0 additions & 1 deletion storage/innobase/trx/trx0sys.cc
Expand Up @@ -440,7 +440,6 @@ trx_sys_init_at_db_start()
TRX_SYS_TRX_ID_WRITE_MARGIN));

mtr.commit();
ut_d(trx_sys.rw_max_trx_id = trx_sys.get_max_trx_id());

trx_dummy_sess = sess_open();

Expand Down
16 changes: 0 additions & 16 deletions storage/innobase/trx/trx0trx.cc
Expand Up @@ -881,10 +881,6 @@ static void trx_resurrect(trx_undo_t *undo, trx_rseg_t *rseg,
trx_resurrect_table_locks(trx, undo);
if (trx_state_eq(trx, TRX_STATE_ACTIVE))
*rows_to_undo+= trx->undo_no;
#ifdef UNIV_DEBUG
if (trx->id > trx_sys.rw_max_trx_id)
trx_sys.rw_max_trx_id= trx->id;
#endif
}


Expand Down Expand Up @@ -1188,12 +1184,6 @@ trx_start_low(
|| srv_read_only_mode
|| srv_force_recovery >= SRV_FORCE_NO_TRX_UNDO);

#ifdef UNIV_DEBUG
if (trx->id > trx_sys.rw_max_trx_id) {
trx_sys.rw_max_trx_id = trx->id;
}
#endif /* UNIV_DEBUG */

mutex_exit(&trx_sys.mutex);
trx_sys.rw_trx_hash.insert(trx);

Expand Down Expand Up @@ -2776,12 +2766,6 @@ trx_set_rw_mode(
if (MVCC::is_view_active(trx->read_view)) {
MVCC::set_view_creator_trx_id(trx->read_view, trx->id);
}

#ifdef UNIV_DEBUG
if (trx->id > trx_sys.rw_max_trx_id) {
trx_sys.rw_max_trx_id = trx->id;
}
#endif /* UNIV_DEBUG */
mutex_exit(&trx_sys.mutex);
trx_sys.rw_trx_hash.insert(trx);
}
Expand Down

0 comments on commit 64048ba

Please sign in to comment.