Please sign in to comment.
Reduce the granularity of innodb_log_file_size
In Mariabackup, we would want the backed-up redo log file size to be a multiple of 512 bytes, or OS_FILE_LOG_BLOCK_SIZE. However, at startup, InnoDB would be picky, requiring the file size to be a multiple of innodb_page_size. Furthermore, InnoDB would require the parameter to be a multiple of one megabyte, while the minimum granularity is 512 bytes. Because the data-file-oriented fil_io() API is being used for writing the InnoDB redo log, writes will for now require innodb_log_file_size to be a multiple of the maximum innodb_page_size (65536 bytes). To complicate matters, InnoDB startup divided srv_log_file_size by UNIV_PAGE_SIZE, so that initially, the unit was bytes, and later it was innodb_page_size. We will simplify this and keep srv_log_file_size in bytes at all times. innobase_log_file_size: Remove. Remove some obsolete checks against overflow on 32-bit systems. srv_log_file_size is always 64 bits, and the maximum size 512GiB in multiples of innodb_page_size always fits in ulint (which is 32 or 64 bits). 512GiB would be 8,388,608*64KiB or 134,217,728*4KiB. log_init(): Remove the parameter file_size that was always passed as srv_log_file_size. log_set_capacity(): Add a parameter for passing the requested file size. srv_log_file_size_requested: Declare static in srv0start.cc. create_log_file(), create_log_files(), innobase_start_or_create_for_mysql(): Invoke fil_node_create() with srv_log_file_size expressed in multiples of innodb_page_size. innobase_start_or_create_for_mysql(): Require the redo log file sizes to be multiples of 512 bytes.
- Loading branch information...
Showing with 59 additions and 97 deletions.
- +1 −1 mysql-test/suite/innodb/r/log_file.result
- +4 −4 mysql-test/suite/innodb/r/log_file_size.result
- +1 −1 mysql-test/suite/innodb/t/log_file.test
- +4 −4 mysql-test/suite/innodb/t/log_file_size.test
- +5 −5 storage/innobase/handler/ha_innodb.cc
- +4 −4 storage/innobase/include/log0log.h
- +3 −11 storage/innobase/include/srv0srv.h
- +6 −8 storage/innobase/log/log0log.cc
- +3 −13 storage/innobase/srv/srv0srv.cc
- +28 −46 storage/innobase/srv/srv0start.cc