I am not familiar with the MariaDB replication protocol, but while reading the code I noticed that:
1) when a MARIADB_GTID_LIST event occurs, the event data is parsed into a GtidSet
2) the BinaryLogClient keeps mariadbGtidListEventData.getMariaGTIDSet().toString() in its gtid field, this is a comma separated string of all position map values (could be random order because of hashmap)
3) when an event occurs that triggers a commitGtid, the String in gtid is passed to the MariadbGtidSet.add method
4) the add method calls MariaGtid.parse, which splits on '-', and takes the first 3 items as domainId, serverId and sequence. But the string could contain more gtids which are discarded in this case.
5) the single MariaGtid is added to the GtidSet
Instead, shouldn't all gtids from the MARIADB_GTID_LIST event be added to the GtidSet?
I am not familiar with the MariaDB replication protocol, but while reading the code I noticed that:
1) when a
MARIADB_GTID_LIST
event occurs, the event data is parsed into aGtidSet
2) the BinaryLogClient keepsmariadbGtidListEventData.getMariaGTIDSet().toString()
in itsgtid
field, this is a comma separated string of all position map values (could be random order because of hashmap) 3) when an event occurs that triggers acommitGtid
, the String in gtid is passed to theMariadbGtidSet.add
method 4) the add method callsMariaGtid.parse
, which splits on '-', and takes the first 3 items as domainId, serverId and sequence. But the string could contain more gtids which are discarded in this case. 5) the single MariaGtid is added to the GtidSetInstead, shouldn't all gtids from the MARIADB_GTID_LIST event be added to the GtidSet?