Skip to content

test(replication): make sequence handshake tests deterministic - #900

Merged
xe-nvdk merged 2 commits into
mainfrom
codex/fix-replication-sequence-test
Sep 17, 2026
Merged

xe-nvdk merged 2 commits into
mainfrom
codex/fix-replication-sequence-test

Conversation

@xe-nvdk

@xe-nvdk xe-nvdk commented Sep 17, 2026

Copy link
Copy Markdown
Member

The sequence handshake tests queued warmup entries through the asynchronous sender. Entries still pending when the reader connected could advance its sequence before the assertion, making unrelated PRs fail CI. This reproduced on the unchanged base of #898: the test expected 100 and observed 899 during 500 runs with the race detector and two CPUs.

Seed the test sender's sequence directly so the handshake assertions run without pending traffic. The restart test still sends a real entry after activation and verifies delivery. Production behavior is unchanged.

Refs #898 and #887.

Validation:

  • Both affected tests passed 500 runs each with -tags=duckdb_arrow -race -cpu=2.
  • The full replication package passed with -tags=duckdb_arrow -race.
  • go vet -tags=duckdb_arrow ./internal/cluster/replication passed.
  • Formatting and git diff --check passed.

AI assistance: Codex assisted with diagnosis, implementation, and validation.

@xe-nvdk
xe-nvdk merged commit 74e5bd3 into main Sep 17, 2026
7 checks passed
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.

1 participant