Repository navigation
Conversation
A state written by an InlineVerifier run keeps its inline-verifier coordinate when later runs resume without the verifier. Once the source purges the binlogs it points at, resuming fails with ERROR 1236 even though the binlog writer coordinate is still available.
austenLacy
approved these changes
Oct 15, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #184. Supersedes #185 (same approach by @ckolbitsch-work, ported to the
BinlogCoordinateAPI so it covers GTID mode too).Problem
On resume,
Ferry.Startalways connects the source streamer atSerializableState.MinSourceBinlogCoordinate(). In file mode that is the older of the binlog writer and InlineVerifier positions; in GTID mode it is the intersection of the two sets.The InlineVerifier coordinate only advances while the verifier runs (
ferry.goskips the startup update whenf.inlineVerifier == nil). It is still copied into every later state, though. So with a state written by a verifier-enabled run, every later resume without the verifier goes back to that old coordinate. Once the source purges those binlogs, resuming fails, even though the binlog writer coordinate is still available:ERROR 1236 (HY000): Could not find first log file name in binary log index fileERROR 1236 (HY000): Cannot replicate because the master purged required binary logsFix
When the InlineVerifier is disabled, resume from
WrittenSourceBinlogCoordinate()instead ofMinSourceBinlogCoordinate().The InlineVerifier coordinate stays in the state untouched, as discussed in #185: if the verifier is re-enabled later, the resume point still includes it (or fails loudly if those binlogs are gone). Clearing it would quietly drop that coverage.
Repro
The first commit adds the test on its own:
test_interrupt_resume_without_inline_verifier_ignores_stale_inline_verifier_coordinate.verifier_type: "Inline"and interrupt. The state now has an InlineVerifier coordinate.FLUSH BINARY LOGS.PURGE BINARY LOGS TOthe rotated file.Before the fix, step 5 exits with the ERROR 1236 messages above in both coordinate modes. The test also moves the
SHOW MASTER STATUS/SHOW BINARY LOG STATUSversion switch into asource_binlog_statushelper, whichtest_interrupt_resume_between_consecutive_rows_eventsnow uses as well.Verification (local, MySQL 8.0.32)
file_positionandgtidmodes.test/integration/interrupt_resume_test.rb: 26 tests, 0 failures, in both modes.test/integration/inline_verifier_test.rb: 22 tests, 0 failures, in both modes.go test ./test/go -run 'TestSerializableState|TestStateTracker|TestBinlogCoordinate'and the root-package GTID/resume tests: pass.Known gap (not changed here)
With the verifier disabled, the state dump drops
BinlogVerifyStore. So rows still waiting for re-verification when the verifier was turned off are lost if it is re-enabled later. That behaviour is the same before and after this PR.