Wrong Redo Log Space reported in the InnoDB Details dashboard

Description

The InnoDB Details dashboard shows the wrong Redo Log Space at the top of the page. It is still calculted as innodb_log_file_size * innodb_log_files_in_group that is good if MySQL < 8.0.30.

For MySQL >=8.0.30 we should consider innodb_redo_log_capacity instead

 

The real size of the redo logs is correctly reported in the InnoDB Log File Usage Hourly box.

 

The following formula should work.
(mysql_version_info{innodb_version=~"8.[0-9].[3-9][0-9]",service_name=~"$service_name"} != 1 and avg by (service_name) (mysql_global_variables_innodb_log_files_in_group{service_name=~"$service_name"} * mysql_global_variables_innodb_log_file_size{service_name=~"$service_name"}) ) or (avg by (service_name)(mysql_global_variables_innodb_redo_log_capacity{service_name=~"$service_name"}) unless (mysql_version_info{innodb_version=~"8.[0-9].[3-9][0-9]",service_name=~"$service_name"} == 1))

How to test

None

How to document

None

Attachments

2

Activity

Vinicius Grippa December 9, 2024 at 5:20 PM

I have run some tests, and we can use the Innodb_redo_log_capacity_resized as the source of truth. With this global setting, checking which parameter was set to configure the redo log capacity won't be necessary.

Fernando Laudares Carmagos October 16, 2024 at 12:51 PM

Until the old innodb_log_file* variables are deprecated, we must consider the conditions documented in the MySQL manual:

innodb_redo_log_capacity supercedes the innodb_log_files_in_group and innodb_log_file_size variables, which are both ignored if innodb_redo_log_capacity is defined.

If innodb_redo_log_capacity is not defined, and if neither innodb_log_file_size or innodb_log_files_in_group are defined, then the default innodb_redo_log_capacity value is used.

  1. If innodb_redo_log_capacity is “customized” by the user (meaning it is set to a different value than the default one), MySQL will use it as the value for the redo log space, always.

  2. If innodb_redo_log_capacity has not been customized but either innodb_log_file_size or innodb_log_files_in group is customized, then the redo log space is defined by the product of the two innodb_log_file* variables.

  3. If neither of the three variables above is defined, then the default value for innodb_redo_log_capacity is used to define the redo log space.

Aaditya Dubey September 27, 2024 at 11:39 AM

Hi

Thank you for the report.
It is verified as described.

Roma Novikov September 26, 2024 at 7:59 AM

It looks like the fix in wasn’t a full fix.

, PTAL

Details

Assignee

Reporter

Priority

Needs QA

Needs Doc

Planned Version/s

Affects versions

Created September 25, 2024 at 3:50 PM
Updated December 11, 2024 at 11:02 AM