Advertisement
rsevero

GTID not in master's binlog

Nov 9th, 2015
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. MariaDB GTID replication – GTID not in master's binlog with {ignore|do}_domain_ids
  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 server 1
  57. 2. issue a INSERT|UPDATE|DELETE on server 2
  58. 3. stop server 2
  59. 4. start server 1. At this point replication channel S1_R3 will go up and running immediately as server 3 never stopped.
  60. 5. start server 2. At this point replication channel S2_R3 will go up and running immediately as server 3 never stopped. BUT replication channel S2_R1 will not go up and will present a message error like “Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Error: connecting slave requested to start from GTID 2-2-10, which is not in the master's binlog'” mentioning that server 1 haven't the most up to date transaction from domain id 2.
  61.  
  62. Observe that replication channel S2_R1 is presenting a error about a domain ID (2) that it has been explicitly told not to track at all! S2_R1 is supposed to track only domain ID 1.
  63.  
  64. The solution for this issue seems to be to MariaDB, on replication channel start, only send the GTID Slave Pos for the domain IDs that it should keep track as defined by {ignore|do}_domain_ids.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement