diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-09 18:47:14 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-09 18:47:14 +0300 |
commit | 6fde0073bfa8f572a02637816a389e56e430edf9 (patch) | |
tree | 296c543645a3bdaf744f6f56285e92e0a5c1d13c | |
parent | c65cb244b35412ef54192b17120f7ace8a8af5fd (diff) | |
download | mariadb-git-6fde0073bfa8f572a02637816a389e56e430edf9.tar.gz |
Rename log_make_checkpoint_at() to log_make_checkpoint()
The function was always called with lsn=LSN_MAX.
Remove that redundant parameter.
Spotted by Thirunarayanan Balathandayuthapani.
-rw-r--r-- | storage/innobase/buf/buf0dblwr.cc | 2 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 2 | ||||
-rw-r--r-- | storage/innobase/include/log0log.h | 8 | ||||
-rw-r--r-- | storage/innobase/include/srv0srv.h | 4 | ||||
-rw-r--r-- | storage/innobase/log/log0log.cc | 12 | ||||
-rw-r--r-- | storage/innobase/row/row0import.cc | 2 | ||||
-rw-r--r-- | storage/innobase/row/row0trunc.cc | 2 | ||||
-rw-r--r-- | storage/innobase/srv/srv0srv.cc | 4 | ||||
-rw-r--r-- | storage/innobase/srv/srv0start.cc | 2 |
9 files changed, 17 insertions, 21 deletions
diff --git a/storage/innobase/buf/buf0dblwr.cc b/storage/innobase/buf/buf0dblwr.cc index 8410a753699..78a7c06a3f0 100644 --- a/storage/innobase/buf/buf0dblwr.cc +++ b/storage/innobase/buf/buf0dblwr.cc @@ -328,7 +328,7 @@ too_small: mtr_commit(&mtr); /* Flush the modified pages to disk and make a checkpoint */ - log_make_checkpoint_at(LSN_MAX); + log_make_checkpoint(); /* Remove doublewrite pages from LRU */ buf_pool_invalidate(); diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 5ff36aa9c24..3267983c89f 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -19075,7 +19075,7 @@ checkpoint_now_set( + (log_sys->append_on_checkpoint != NULL ? log_sys->append_on_checkpoint->size() : 0) < log_sys->lsn) { - log_make_checkpoint_at(LSN_MAX); + log_make_checkpoint(); fil_flush_file_spaces(FIL_TYPE_LOG); } diff --git a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h index 8a6705359db..0fd983a1a10 100644 --- a/storage/innobase/include/log0log.h +++ b/storage/innobase/include/log0log.h @@ -210,15 +210,13 @@ log_buffer_sync_in_background( /** Make a checkpoint. Note that this function does not flush dirty blocks from the buffer pool: it only checks what is lsn of the oldest modification in the pool, and writes information about the lsn in -log files. Use log_make_checkpoint_at() to flush also the pool. +log files. Use log_make_checkpoint() to flush also the pool. @param[in] sync whether to wait for the write to complete @return true if success, false if a checkpoint write was already running */ bool log_checkpoint(bool sync); -/** Make a checkpoint at or after a specified LSN. -@param[in] lsn the log sequence number, or LSN_MAX -for the latest LSN */ -void log_make_checkpoint_at(lsn_t lsn); +/** Make a checkpoint */ +void log_make_checkpoint(); /****************************************************************//** Makes a checkpoint at the latest lsn and writes it to first page of each diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index 591eec4b42c..0f1936eac70 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -656,11 +656,11 @@ do { \ #ifdef HAVE_PSI_STAGE_INTERFACE /** Performance schema stage event for monitoring ALTER TABLE progress -everything after flush log_make_checkpoint_at(). */ +everything after flush log_make_checkpoint(). */ extern PSI_stage_info srv_stage_alter_table_end; /** Performance schema stage event for monitoring ALTER TABLE progress -log_make_checkpoint_at(). */ +log_make_checkpoint(). */ extern PSI_stage_info srv_stage_alter_table_flush; /** Performance schema stage event for monitoring ALTER TABLE progress diff --git a/storage/innobase/log/log0log.cc b/storage/innobase/log/log0log.cc index 682a79409f9..c3eaa05b680 100644 --- a/storage/innobase/log/log0log.cc +++ b/storage/innobase/log/log0log.cc @@ -1553,7 +1553,7 @@ log_append_on_checkpoint( /** Make a checkpoint. Note that this function does not flush dirty blocks from the buffer pool: it only checks what is lsn of the oldest modification in the pool, and writes information about the lsn in -log files. Use log_make_checkpoint_at() to flush also the pool. +log files. Use log_make_checkpoint() to flush also the pool. @param[in] sync whether to wait for the write to complete @return true if success, false if a checkpoint write was already running */ bool log_checkpoint(bool sync) @@ -1667,14 +1667,12 @@ bool log_checkpoint(bool sync) return(true); } -/** Make a checkpoint at or after a specified LSN. -@param[in] lsn the log sequence number, or LSN_MAX -for the latest LSN */ -void log_make_checkpoint_at(lsn_t lsn) +/** Make a checkpoint */ +void log_make_checkpoint() { /* Preflush pages synchronously */ - while (!log_preflush_pool_modified_pages(lsn)) { + while (!log_preflush_pool_modified_pages(LSN_MAX)) { /* Flush as much as we can */ } @@ -2010,7 +2008,7 @@ wait_suspend_loop: if (!srv_read_only_mode) { service_manager_extend_timeout(INNODB_EXTEND_TIMEOUT_INTERVAL, "ensuring dirty buffer pool are written to log"); - log_make_checkpoint_at(LSN_MAX); + log_make_checkpoint(); log_mutex_enter(); diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index abadeafba9c..6d0d77c9f5b 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/row/row0import.cc @@ -2090,7 +2090,7 @@ row_import_cleanup( DBUG_EXECUTE_IF("ib_import_before_checkpoint_crash", DBUG_SUICIDE();); - log_make_checkpoint_at(LSN_MAX); + log_make_checkpoint(); return(err); } diff --git a/storage/innobase/row/row0trunc.cc b/storage/innobase/row/row0trunc.cc index 9906ba11614..09573610e7c 100644 --- a/storage/innobase/row/row0trunc.cc +++ b/storage/innobase/row/row0trunc.cc @@ -2224,7 +2224,7 @@ truncate_t::fixup_tables_in_non_system_tablespace() if (err == DB_SUCCESS && s_tables.size() > 0) { - log_make_checkpoint_at(LSN_MAX); + log_make_checkpoint(); } for (ulint i = 0; i < s_tables.size(); ++i) { diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index a93a7cd71f8..bff26d05029 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -669,12 +669,12 @@ static const ulint SRV_MASTER_SLOT = 0; #ifdef HAVE_PSI_STAGE_INTERFACE /** Performance schema stage event for monitoring ALTER TABLE progress -everything after flush log_make_checkpoint_at(). */ +everything after flush log_make_checkpoint(). */ PSI_stage_info srv_stage_alter_table_end = {0, "alter table (end)", PSI_FLAG_STAGE_PROGRESS}; /** Performance schema stage event for monitoring ALTER TABLE progress -log_make_checkpoint_at(). */ +log_make_checkpoint(). */ PSI_stage_info srv_stage_alter_table_flush = {0, "alter table (flush)", PSI_FLAG_STAGE_PROGRESS}; diff --git a/storage/innobase/srv/srv0start.cc b/storage/innobase/srv/srv0start.cc index 46a2b7b7c09..75bdf17eab7 100644 --- a/storage/innobase/srv/srv0start.cc +++ b/storage/innobase/srv/srv0start.cc @@ -516,7 +516,7 @@ create_log_files( (log_sys->lsn - log_sys->last_checkpoint_lsn)); log_mutex_exit(); - log_make_checkpoint_at(LSN_MAX); + log_make_checkpoint(); return(DB_SUCCESS); } |