Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
11.4.5
-
None
Description
If there are binary logs to be purged at primary server start up within the value of expire_logs_days and slave_connections_needed_for_purge > 0 then the server appears to not purge logs regardless of whether a connecting replica node has processed the event or not. Binlog expiry never occurs after the note is shown.
Steps to replicate:
- Set up replication between two servers
- Create some events on the primary and flush logs
CREATE DATABASE testing;
CREATE TABLE testing.t1 (id int);
INSERT INTO TABLE testing.t1 VALUES(1);
FLUSH BINARY LOGS;
- Ensure the replica has processed all events on the primary. The binary log file should match the output from show master status on the primary:
mariadb -e "show all slaves status\G"|grep \ Master_Log_File
- Set binlog_expire_logs_seconds=10 on the primary and restart
At this point the primary should show a similar note in the error log:
2025-02-17 11:23:34 0 [Note] Binary log 'rocky9-MariaDB1-bin.000001' is not purged because less than 'slave_connections_needed_for_purge' slaves have processed it
|
Binary logs will not ever be expired after this note is shown, though a manual PURGE BINARY LOGS will work.
Attachments
Activity
Transition | Time In Source Status | Execution Times |
---|
|
2h 36m | 1 |
|
2h 39m | 1 |