Bug #108471 Allow redo log register UDF to specify a register name
Submitted: 13 Sep 2022 12:16 Modified: 13 Sep 2022 12:33
Reporter: Marcelo Altmann Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0.30 OS:Any
Assigned to: CPU Architecture:Any

[13 Sep 2022 12:16] Marcelo Altmann
Description:
Newly added UDF to register a redo log consumer does not allow users to specify a consumer name. It has MEB name hardcoded.
If someone register itself as a redo log consumer via the udf, and later becomes the most lagging consumer, a misleading error message will be issued:

2022-09-13T12:14:57.252934Z 0 [Warning] [MY-013934] [InnoDB] Redo log writer is waiting for MEB redo log consumer which is currently reading LSN=19380031 preventing reclamation of subsequent portion of the redo log. Consider increasing innodb_redo_log_capacity.

How to repeat:
Session 1:
bin/mysqld --innodb-redo-log-capacity=8M &

mysql>

CREATE DATABASE test;
CREATE TABLE test.tb1 (ID INT PRIMARY KEY AUTO_INCREMENT, name blob);
DO innodb_redo_log_consumer_register();

-- leave session open

Session 2:

for i in $(seq 1 10000); do mysql -P 3306 -e "INSERT INTO test.tb1 VALUES (NULL, REPEAT('a', 32 * 1024))"; done

Suggested fix:

Allow innodb_redo_log_consumer_register UDF to receive a string as parameter, and set this parameter as attribute name of the consumer.
[13 Sep 2022 12:33] MySQL Verification Team
Hello Marcelo,

Thank you for the report and feedback.

regards,
Umesh
[13 Sep 2022 13:19] Marcelo Altmann
patch applied on top of 8.0.30

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: 0001-Bug-108471-Allow-redo-log-register-UDF-to-specify-a-.patch (application/octet-stream, text), 7.53 KiB.