MDEV-7237: Parallel replication: incorrect relaylog position after stop/start the slave
The replication relay log position was sometimes updated incorrectly at the end of a transaction in parallel replication. This happened because the relay log file name was taken from the current Relay_log_info (SQL driver thread), not the correct value for the transaction in question. The result was that if a transaction was applied while the SQL driver thread was at least one relay log file ahead, _and_ the SQL thread was subsequently stopped before applying any events from the most recent relay log file, then the relay log position would be incorrect - wrong relay log file name. Thus, when the slave was started again, usually a relay log read error would result, or in rare cases, if the position happened to be readable, the slave might even skip arbitrary amounts of events. In GTID mode, the relay log position is reset when both slave threads are restarted, so this bug would only be seen in non-GTID mode, or in GTID mode when only the SQL thread, not the IO thread, was stopped.
Showing
Please register or sign in to comment