Dan Ungureanu <dan@ungureanu.me> writes:
implementations diverged. Now, my question is: for starters, is it enough to consider the code from MySQL as some sort of guideline when implementing these features in MariaDB?
For MDEV-5993, I am not familiar with it, but there seems a good chance that the MySQL code code can be ported, as it does not involve GTID or parallel replication. For MDEV-4989, I guess that the MySQL code could be a guideline for how to name the command-line options, and where in mysqlbinlog.cc to modify the code. But for the actual implementation, the MySQL code may not be useful.
though the mechanism behind the scene seems to be pretty simple, the codebase is quite massive and I have a hard time going through all of it.
Well, there is no need to go through _all_ of the MariaDB server code, obviously, but surely the GTID part needs to be very well understood to be able to implement MDEV-4989. In fact, I would guess that getting this understanding and coming up with a proper code design is the major part of the work - the actual coding should then be simple. In order to do --start-gtid and --stop-gtid, one needs to understand how to maintain different binlog positions per-domain, and how to handle out-of-order sequence numbers. There is already code to handle this for the master server in sql/sql_repl.cc, so this code needs somehow to be refactored to be shared between the server and mysqlbinlog.cc. So understanding the code in the server that handles the master and slave side of GTID slave connect seems necessary. - Kristian.