1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-32953: main.rpl_mysqldump_slave Fails with "Master binlog wasn’t deleted" Assertion

Because --delete-master-logs immediately purges logs after flushing,
it is possible the binlog dump thread would still be using the old
log when the purge executes, disallowing the file from being
deleted.

This patch institutes a work-around in the test as follows:
 1) temporarily stop the slave so there is no chance the old binlog
is still being referenced.
 2) set master_use_gtid=Slave_pos so the slave can still appear
up-to-date on the master after the master flushes/purges its logs
(while the slave is offline). Otherwise (i.e. if using binlog
file/pos), the slave would point to a purged log file, and receive
an error immediately upon connecting to the master.

Reviewed By
============
Andrei Elkin <andrei.elkin@mariadb.com>
This commit is contained in:
Brandon Nesterenko
2023-12-05 14:27:39 -07:00
parent ba94778d2c
commit 9be7e03f70
2 changed files with 38 additions and 1 deletions

View File

@ -72,6 +72,13 @@ id int
insert into t values (1);
insert into t values (2);
drop table t;
connection slave;
include/stop_slave.inc
change master to master_use_gtid=slave_pos;
connection master;
# Ensuring the binlog dump thread is killed on primary...
-- CHANGE MASTER TO MASTER_LOG_FILE='master-bin.000002', MASTER_LOG_POS=BINLOG_START;
-- SET GLOBAL gtid_slave_pos='0-1-1005';
connection slave;
include/start_slave.inc
include/rpl_end.inc