Closed laurynas-biveinis closed 1 year ago
@sunshine-Chun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@laurynas-biveinis has updated the pull request. You must reimport the pull request before landing.
@sunshine-Chun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
Under write workload, it is possible for the InnoDB log archiver to archive log data past the clone SE synchronization point LSN, with the following thread interleaving:
1) Clone SE synchronization executes the performance_schema.LOG_STATUS query 2) User query performs a write to InnoDB, advancing the LSN 3) InnoDB log archiver archives the log written in the previous step 4) Clone SE synchronization asks the InnoDB log archiver to stop archiving at the clone LSN, which is less than the already-archived LSN.
It was assumed that this scenario cannot happen, thus code hits various asserts, and on the release build may continue archiving indefinitely.
Since the log archiver already has support for providing less log data than archived, fix by setting the log archiver stop LSN correctly to smaller of SE synchronization and already-archived LSN.
Add a DEBUG_SYNC-using testcase.