Relay logs being generated on a replication leader (a promoted follower)

I’m at a loss here.
I have a Community MySQL 5.7.26 AWS server that was previously a follower in a leader-> follower arrangement. We needed to promote the follower to a leader status.
As part of that process RESET SLAVE is executed.
SHOW SLAVE STATUS comes back with an empty set of information,
HOWEVER, I am getting relay logs being generated (“empty”, 201 bytes of file header) every 1-2 hours.
The server is active enough that the binary logs are being rotated out every 10-20 minutes (only 100M, but that’s a different issue) and the modification time on a relay log does correspond with logrotate executing once an hour (on the 17 minute), but I also see log files last modified at 12 mins after the hour…
-rw-r----- 1 mysql mysql 201 Mar 28 22:12 relay-bin.000586
-rw-r----- 1 mysql mysql 201 Mar 28 23:17 relay-bin.000587
-rw-r----- 1 mysql mysql 201 Mar 29 02:12 relay-bin.000588
-rw-r----- 1 mysql mysql 201 Mar 29 02:17 relay-bin.000589
-rw-r----- 1 mysql mysql 201 Mar 29 05:17 relay-bin.000590
-rw-r----- 1 mysql mysql 201 Mar 29 06:12 relay-bin.000591
-rw-r----- 1 mysql mysql 201 Mar 29 07:17 relay-bin.000592
-rw-r----- 1 mysql mysql 201 Mar 29 08:17 relay-bin.000593
-rw-r----- 1 mysql mysql 154 Mar 29 08:17 relay-bin.000594
-rw-r----- 1 mysql mysql 21K Mar 29 08:17 relay-bin.index
(there are 595 files on the server at this time).

There are zero issues on the follower.

Thoughts on where to poke my nose?

John Breen

1 Like

Hi @jbreen , welcome to the Percona forums!

To be clear, are you running this database on AWS EC2 or is this AWS RDS?

1 Like

Sorry about that Michael … EC2 …

1 Like

No problem @jbreen

What happens if you execute

1 Like

That was done as part of the promotion from follower to leader.
Have not attempted that since tripping over this.
With show slave status coming back null, I figured that it had been reset.
Checking the rest of the 12 “clusters” now to see how prevalent this is and trying to determine if there’s an issue in our process.

After creating new follower and getting replication pointed to the “new leader”.

Stop replication on the new leader, promote to the leader and enable writes

sudo mysql 2mysql> 3 flush logs; 4 # confirm 0 seconds behind leader and the binlog is not moving in slave status 5 show slave status\G 6 stop slave; 7 RESET slave ALL; 8 SET GLOBAL super_read_only = OFF; 9 SET GLOBAL read_only = OFF;

1 Like