[MDEV-9544] FLUSH [RELAY] LOGS does not rotate logs for a named slave Created: 2016-02-10  Updated: 2020-12-08  Resolved: 2017-06-05

Status: Closed
Project: MariaDB Server
Component/s: Replication
Affects Version/s: 10.0, 10.1
Fix Version/s: 10.1.25

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Lixun Peng
Resolution: Fixed Votes: 0
Labels: multisource

Attachments: Text File mdev-9544.patch    
Issue Links:
Relates
relates to MDEV-9339 Can purge relay log when using multi-... Closed
Sprint: 10.1.22

 Description   

FLUSH LOGS and FLUSH RELAY LOGS rotate relay logs for a usual anonymous slave, but not for a named one.

Test case

--source include/master-slave.inc
 
--connection slave
--let $datadir=`select @@datadir`
 
--echo #
--echo # Try traditional slave first:
--echo #
 
--list_files $datadir *relay*
flush logs;
--list_files $datadir *relay*
flush relay logs;
--list_files $datadir *relay*
 
stop slave;
reset slave all;
 
--echo #
--echo # Now try a named slave:
--echo #
 
eval change master 'm1' to master_host='127.0.0.1', master_port=$MASTER_MYPORT, master_user='root';
start slave 'm1';
 
--list_files $datadir *relay*
flush logs;
--list_files $datadir *relay*
flush relay logs;
--list_files $datadir *relay*

Results

#
# Try traditional slave first:
#
relay-log.info
slave-relay-bin.000001
slave-relay-bin.000002
slave-relay-bin.index
flush logs;
relay-log.info
slave-relay-bin.000001
slave-relay-bin.000002
slave-relay-bin.000003
slave-relay-bin.index
flush relay logs;
relay-log.info
slave-relay-bin.000002
slave-relay-bin.000003
slave-relay-bin.000004
slave-relay-bin.index
stop slave;
reset slave all;
#
# Now try a named slave:
#
change master 'm1' to master_host='127.0.0.1', master_port=16000, master_user='root';
start slave 'm1';
relay-log-m1.info
slave-relay-bin-m1.000001
slave-relay-bin-m1.index
flush logs;
relay-log-m1.info
slave-relay-bin-m1.000001
slave-relay-bin-m1.index
flush relay logs;
relay-log-m1.info
slave-relay-bin-m1.000001
slave-relay-bin-m1.index



 Comments   
Comment by Daniel Black [ 2017-03-01 ]

FLUSH RELAY LOGS "connection name" is documented https://mariadb.com/kb/en/mariadb/flush/, Is this working as desired?

Comment by Sachin Setiya (Inactive) [ 2017-03-01 ]

Yes, It is working as desired , The only problem is flush logs should rotate all relay logs for multisource replication. I have created the patch , only test case is remaning

Comment by Sachin Setiya (Inactive) [ 2017-03-01 ]

mdev-9544.patch

Comment by Lixun Peng [ 2017-03-06 ]

monty
This patch will conflict with your patch about LOCK_active_mi optimization.

Comment by Sachin Setiya (Inactive) [ 2017-06-05 ]

Final Patch
http://lists.askmonty.org/pipermail/commits/2017-June/011225.html

Generated at Thu Feb 08 07:35:28 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.