Skip to content

fix(#766,#772): pin chunk size in binlog E2E tests via SetDynamicChunking#774

Merged
morgo merged 2 commits into
block:mainfrom
morgo:fix-issue-772-flaky-binlog-chunker
May 1, 2026
Merged

fix(#766,#772): pin chunk size in binlog E2E tests via SetDynamicChunking#774
morgo merged 2 commits into
block:mainfrom
morgo:fix-issue-772-flaky-binlog-chunker

Conversation

@morgo
Copy link
Copy Markdown
Collaborator

@morgo morgo commented May 1, 2026

Summary

Test plan

  • go test -run "TestE2EBinlogSubscribingCompositeKey$|TestE2EBinlogSubscribingRogueValues$" ./pkg/migration/
  • go test -run TestE2EBinlog ./pkg/migration/
  • go test ./pkg/table/...
  • CI green across both flaky tests over multiple runs

🤖 Generated with Claude Code

morgo and others added 2 commits May 1, 2026 14:25
…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>
@morgo morgo marked this pull request as ready for review May 1, 2026 20:41
@morgo morgo merged commit 61a49df into block:main May 1, 2026
12 of 13 checks passed
@morgo morgo deleted the fix-issue-772-flaky-binlog-chunker branch May 1, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

flaky test: TestE2EBinlogSubscribingRogueValues flaky test: TestE2EBinlogSubscribingCompositeKey

2 participants