Improve differences between generated mysql service id values#1293
Improve differences between generated mysql service id values#1293daianamezdrea merged 1 commit intopuppetlabs:masterfrom
Conversation
|
Some additional background on the reasoning. We've hit multiple collisions with nodes getting the same server-id inside of the same replication chains. It has been getting more common as the number of nodes has increased. Examples using the old function mac => "02:00:0a:32:78:cb", mac => "04:FE:0A:32:79:3B" The new method is obviously not perfect but using the entire mac int value and filtering down should reduce collisions. |
This uses the entire mac address then reduces the value to the acceptable range for mysql.
|
I also ran a test using the old vs new method against 1 million random mac addresses. |
|
Hello @ryaner, thank you for your contribution! This looks good ! |
This uses the entire mac address then reduces the value to the
acceptable range for mysql.