Advertisement
rsevero

GTID Slave Pos of untrack domain ids being updated

Nov 9th, 2015
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. MariaDB GTID replication – {ignore|do}_domain_ids not been considered when updating GTID Slave Pos
  2.  
  3. Let's consider a 3 master setup where each server has 2 replication channels, one to each of the other 2 servers where these replication channels where setup with:
  4.  
  5. SETTING: Server_id: 1 | IP: 10.0.3.223
  6. STOP ALL SLAVES;
  7. CHANGE MASTER "S1_R2" TO
  8. master_host = "10.0.3.136",
  9. master_user = "replicator",
  10. master_use_gtid = slave_pos,
  11. master_password = "password",
  12. do_domain_ids = (2)
  13. CHANGE MASTER "S1_R3" TO
  14. master_host = "10.0.3.171",
  15. master_user = "replicator",
  16. master_use_gtid = slave_pos,
  17. master_password = "password",
  18. do_domain_ids = (3)
  19. START ALL SLAVES;
  20.  
  21.  
  22. SETTING: Server_id: 2 | IP: 10.0.3.136
  23. STOP ALL SLAVES;
  24. CHANGE MASTER "S2_R1" TO
  25. master_host = "10.0.3.223",
  26. master_user = "replicator",
  27. master_use_gtid = slave_pos,
  28. master_password = "password",
  29. do_domain_ids = (1)
  30. CHANGE MASTER "S2_R3" TO
  31. master_host = "10.0.3.171",
  32. master_user = "replicator",
  33. master_use_gtid = slave_pos,
  34. master_password = "password",
  35. do_domain_ids = (3)
  36. START ALL SLAVES;
  37.  
  38.  
  39. SETTING: Server_id: 3 | IP: 10.0.3.171
  40. STOP ALL SLAVES;
  41. CHANGE MASTER "S3_R1" TO
  42. master_host = "10.0.3.223",
  43. master_user = "replicator",
  44. master_use_gtid = slave_pos,
  45. master_password = "password",
  46. do_domain_ids = (1)
  47. CHANGE MASTER "S3_R2" TO
  48. master_host = "10.0.3.136",
  49. master_user = "replicator",
  50. master_use_gtid = slave_pos,
  51. master_password = "password",
  52. do_domain_ids = (2)
  53. START ALL SLAVES;
  54.  
  55. After initially starting all replications:
  56. 1. Stop replication channel S1_R2;
  57. 2. Take note of GTID Slave Pos for domain ID 2 on server 1;
  58. 3. Issue some INSERT |UPDATE|DELETE on server 2;
  59. 4. Take note of GTID Slave Pos for domain ID 2 on server 1;
  60.  
  61. Observe that the GTID from steps 2 and 4 are diferent. Replication channel S1_R3 updated the GTID Slave Pos of domain ID 2 despite having been configured to just track domain ID 3!
  62.  
  63. When replication channel S1_R2 is brought back online the changes that occured on step 3 will be lost on server 1.
  64.  
  65. The solution for this issue seems to be to make each replication channel thread to update only the GTID Slave Pos for the domain IDs it should track as defined by {ignore|do}_domain_ids.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement