Bug #102475 | Binlog coordinates no longer appear in .err log following crash recovery | ||
---|---|---|---|
Submitted: | 3 Feb 2021 16:25 | Modified: | 4 Feb 2021 13:59 |
Reporter: | Rob Wagner | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: InnoDB storage engine | Severity: | S4 (Feature request) |
Version: | 8.0.23 | OS: | Any |
Assigned to: | CPU Architecture: | Any |
[3 Feb 2021 16:25]
Rob Wagner
[4 Feb 2021 13:11]
MySQL Verification Team
Hi Rob, Thanks for the report. I changed this to "Feature Request" as I can't agree this is a bug, but this info is valuable and having it in 8.0 should be useful so I'm verifying this as FR. Kind regards Bogdan
[4 Feb 2021 13:59]
Rob Wagner
Bogdan - thanks. Late yesterday, I read https://dev.mysql.com/doc/refman/8.0/en/binary-log.html: --- In 8.0.0 and higher, the InnoDB support for two-phase commit in XA transactions is always enabled. InnoDB support for two-phase commit in XA transactions ensures that the binary log and InnoDB data files are synchronized. However, the MySQL server should also be configured to synchronize the binary log and the InnoDB logs to disk before committing the transaction. The InnoDB logs are synchronized by default, and sync_binlog=1 ensures the binary log is synchronized. The effect of implicit InnoDB support for two-phase commit in XA transactions and sync_binlog=1 is that at restart after a crash, after doing a rollback of transactions, the MySQL server scans the latest binary log file to collect transaction xid values and calculate the last valid position in the binary log file. The MySQL server then tells InnoDB to complete any prepared transactions that were successfully written to the to the binary log, and truncates the binary log to the last valid position. This ensures that the binary log reflects the exact data of InnoDB tables, and therefore the replica remains in synchrony with the source because it does not receive a statement which has been rolled back. --- If I am only using InnoDB, then this suggests that I should be able to obtain the coordinates by simply looking at the end of the largest binary log, right? If so, then we certainly have a workaround and I agree this is only a feature request.
[4 Feb 2021 14:33]
MySQL Verification Team
Hi, Yes, that's why I changed the report to FR. kind regards Bogdan
[4 Feb 2021 18:33]
Sven Sandberg
Posted by developer: This message was removed in 951464867b53c12d5430f8f6b2d0e50bd849bb8d WL#9211 InnoDB: Clone Replication Coordinates It was printed from InnoDB code, so changing category to InnoDB.