This week, I worked on some GTID code. Like we saw in Week 2, MariaDB global transaction ID, or GTID for short, consists of three numbers separated with dashes ‘-‘. For example:
With each section defined accordingly. The work I did was to write a query to be executed on a slave server to fetch the Latest GTID transaction applied there. To obtain this value, we need to execute the query
The sequence number part of a GTID represent the transaction number so parsing it to get the GTID with the highest sequence number identifies the most up to date slave and so we will need to return the IP of the domain ID. This will be done in the next milestone of the project.
All commits for the GTID query to get most up to date master can be found on Github here.