diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-27 13:17:18 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-04-29 09:46:24 +0300 |
commit | baa5a43d8cb2f747eeb70d394a362fb5f3fdd194 (patch) | |
tree | 91f51c270b3e77233852283b8dfcda0006ff924b /extra | |
parent | d73a898d644b488a5985856b128da39dd98b6925 (diff) | |
download | mariadb-git-baa5a43d8cb2f747eeb70d394a362fb5f3fdd194.tar.gz |
MDEV-16045: Replace log_group_t with log_t::files
There is only one log_sys and only one log_sys.log.
log_t::files::create(): Replaces log_init().
log_t::files::close(): Replaces log_group_close(), log_group_close_all().
fil_close_log_files(): if (free) log_sys.log_close();
The callers that passed free=true used to call log_group_close_all().
log_header_read(): Replaces log_group_header_read().
log_t::files::file_header_bufs_ptr: Use a single allocation.
log_t::files::file_header_bufs[]: Statically allocate the pointers.
log_t::files::set_fields(): Replaces log_group_set_fields().
log_t::files::calc_lsn_offset(): Replaces log_group_calc_lsn_offset().
Simplify the computation by using fewer variables.
log_t::files::read_log_seg(): Replaces log_group_read_log_seg().
log_sys_t::complete_checkpoint(): Replaces log_io_complete_checkpoint().
fil_aio_wait(): Move the logic from log_io_complete().
Diffstat (limited to 'extra')
-rw-r--r-- | extra/mariabackup/xtrabackup.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 4bba3ba4e40..89914d5ea4a 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -2544,8 +2544,7 @@ xtrabackup_copy_logfile(copy_logfile copy) lsn_t lsn= start_lsn; for(int retries= 0; retries < 100; retries++) { - if (log_group_read_log_seg(log_sys.buf, &log_sys.log, - &lsn, end_lsn)){ + if (log_sys.log.read_log_seg(&lsn, end_lsn)) { break; } msg("Retrying read of a redo log block"); @@ -3819,7 +3818,7 @@ fail: SRV_MAX_N_PENDING_SYNC_IOS); log_sys.create(); - log_init(srv_n_log_files); + log_sys.log.create(srv_n_log_files); fil_space_t* space = fil_space_create( "innodb_redo_log", SRV_LOG_SPACE_FIRST_ID, 0, FIL_TYPE_LOG, NULL); @@ -3924,7 +3923,7 @@ reread_log_header: ut_ad(!((log_sys.log.format ^ LOG_HEADER_FORMAT_CURRENT) & ~LOG_HEADER_FORMAT_ENCRYPTED)); - log_group_header_read(&log_sys.log, max_cp_field); + log_header_read(max_cp_field); if (checkpoint_no_start != mach_read_from_8(buf + LOG_CHECKPOINT_NO)) { goto reread_log_header; |