Bug #68542 Handle duplicated server_id across multiple slaves in a better manner
Submitted: 1 Mar 2013 19:46 Modified: 4 Mar 2013 14:19
Reporter: Davi Arnaut (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.5 OS:Any
Assigned to: CPU Architecture:Any
Tags: duplicate, server_id

[1 Mar 2013 19:46] Davi Arnaut
Description:
When a slave connects to the master, the master checks for existing slave threads with the same server_id in kill_zombie_dump_threads and if it finds any, kills them. This causes a very difficult to debug situation where two slaves with the same server_id will cycle very quickly disconnecting each other and causing huge amounts of relay logs to be created (as they are rotated with each disconnect).

How to repeat:
Have two slaves with the same server_id connect to a master.

Suggested fix:
When a slave with a conflicting server_id connects we should do two things:

1. Log a specific error message on the master whenever killing "zombie" slave threads in all cases.
2. If the source IP address of the existing and incoming slave differ, reject the connection from the incoming slave (leaving the existing slave alone) with a specific error message describing the problem.
[4 Mar 2013 14:19] Erlend Dahl
Thank you for a valid bug / feature request.