diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2017-05-26 14:04:19 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2017-06-06 12:06:41 +0300 |
commit | 86927cc712b6589f15fb1306a5fc42bb705c5302 (patch) | |
tree | 8d3cd8fa5651b9fdc95bcc3590213dbe7c52e60e /storage/innobase/include/log0log.h | |
parent | ed2976caf005e65bc2b5eae1d174dfe72535683f (diff) | |
download | mariadb-git-86927cc712b6589f15fb1306a5fc42bb705c5302.tar.gz |
Remove traces of multiple InnoDB redo logs
InnoDB never supported more than one copy of a redo log.
There were provisions to do that. For Mariabackup, let us clean up
this code.
log_sys_init(): Renamed from log_init().
log_set_capacity(): Renamed from log_calc_max_ages().
log_init(): Renamed from log_group_init(). Remove the parameters
id, space_id. Let the caller invoke log_set_capacity() when needed.
log_group_t: Remove id, space_id, log_groups.
log_t: Replace log_groups with a single log.
recv_find_max_checkpoint(): Declare globally. Remove the first parameter.
xtrabackup_choose_lsn_offset(): Remove (dead code).
Diffstat (limited to 'storage/innobase/include/log0log.h')
-rw-r--r-- | storage/innobase/include/log0log.h | 46 |
1 files changed, 20 insertions, 26 deletions
diff --git a/storage/innobase/include/log0log.h b/storage/innobase/include/log0log.h index d1aae64227e..05e53e23f28 100644 --- a/storage/innobase/include/log0log.h +++ b/storage/innobase/include/log0log.h @@ -151,24 +151,24 @@ UNIV_INLINE lsn_t log_get_max_modified_age_async(void); /*================================*/ -/******************************************************//** -Initializes the log. */ +/** Initializes the redo logging subsystem. */ void -log_init(void); -/*==========*/ -/******************************************************************//** -Inits a log group to the log system. -@return true if success, false if not */ -MY_ATTRIBUTE((warn_unused_result)) +log_sys_init(); + +/** Initialize the redo log. +@param[in] n_files number of files +@param[in] file_size file size in bytes */ +void +log_init(ulint n_files, lsn_t file_size); +/** Calculate the recommended highest values for lsn - last_checkpoint_lsn +and lsn - buf_get_oldest_modification(). +@retval true on success +@retval false if the smallest log group is too small to +accommodate the number of OS threads in the database server */ bool -log_group_init( -/*===========*/ - ulint id, /*!< in: group id */ - ulint n_files, /*!< in: number of log files */ - lsn_t file_size, /*!< in: log file size in bytes */ - ulint space_id); /*!< in: space id of the file space - which contains the log files of this - group */ +log_set_capacity() + MY_ATTRIBUTE((warn_unused_result)); + /******************************************************//** Completes an i/o to a log file. */ void @@ -552,16 +552,12 @@ Currently, this is only protected by log_sys->mutex. However, in the case of log_write_up_to(), we will access some members only with the protection of log_sys->write_mutex, which should affect nothing for now. */ struct log_group_t{ - /** log group identifier (always 0) */ - ulint id; /** number of files in the group */ ulint n_files; /** format of the redo log: e.g., LOG_HEADER_FORMAT_CURRENT */ ulint format; /** individual log file size in bytes, including the header */ - lsn_t file_size - /** file space which implements the log group */; - ulint space_id; + lsn_t file_size; /** corruption status */ log_group_state_t state; /** lsn used to fix coordinates within the log group */ @@ -580,8 +576,6 @@ struct log_group_t{ byte* checkpoint_buf_ptr; /** buffer for writing a checkpoint header */ byte* checkpoint_buf; - /** list of log groups */ - UT_LIST_NODE_T(log_group_t) log_groups; /** @return whether the redo log is encrypted */ bool is_encrypted() const @@ -639,8 +633,8 @@ struct log_t{ max_checkpoint_age; this flag is peeked at by log_free_check(), which does not reserve the log mutex */ - UT_LIST_BASE_NODE_T(log_group_t) - log_groups; /*!< log groups */ + /** the redo log */ + log_group_t log; /** The fields involved in the log buffer flush @{ */ @@ -729,7 +723,7 @@ struct log_t{ /** @return whether the redo log is encrypted */ bool is_encrypted() const { - return(UT_LIST_GET_FIRST(log_groups)->is_encrypted()); + return(log.is_encrypted()); } }; |