fix(#766,#772): pin chunk size in binlog E2E tests via SetDynamicChunking#774
Merged
Merged
Conversation
…ynamicChunking TestE2EBinlogSubscribingCompositeKey and TestE2EBinlogSubscribingRogueValues both assume a 2-chunk layout: an initial chunk with an upper bound and a final open-ended chunk. Under CI load the first chunk's CopyChunk can exceed ChunkerTarget*DynamicPanicFactor (100ms*5=500ms by default), which triggers the composite chunker's panic path and shrinks chunkSize from 1000 to 100. The next prefetch then returns a real upper-bound row, so the second chunk comes back with both bounds and the equality assertion fails. Mirror the optimistic chunker fix from PR block#770: expose chunkerComposite.SetDynamicChunking and have these two tests call it right after setup. Pins ChunkSize=1000 deterministically without depending on internal Feedback ordering or stretching TargetChunkTime. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The composite-chunker fix duplicated the inline closure that block#770 introduced in TestCheckpoint. Move it to helpers_test.go so both binlog_test.go and resume_test.go share one implementation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
aparajon
approved these changes
May 1, 2026
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.
Summary
CopyChunkcan exceedChunkerTarget*DynamicPanicFactor(100ms × 5 = 500ms), tripping the composite chunker's panic path and shrinkingchunkSizefrom 1000 to 100. The next prefetch then returns a real upper-bound row, so the second chunk comes back with both bounds and the equality check fails.chunkerComposite.SetDynamicChunkingand have these two tests call it right afterm.setup()to pinChunkSize=1000deterministically.Test plan
go test -run "TestE2EBinlogSubscribingCompositeKey$|TestE2EBinlogSubscribingRogueValues$" ./pkg/migration/go test -run TestE2EBinlog ./pkg/migration/go test ./pkg/table/...🤖 Generated with Claude Code