Skip to content

[Bug]: TestCDCNoFullPublicTakeoverLifecycle flakes on stale cross-CN checkpoint read #29375

Closed

Description

@XuPeng-SH

Summary

TestCDCNoFullPublicTakeoverLifecycle intermittently fails in pkg/tests/sqlintegration at the assertion that the checkpoint sampled after CN A starts cancellation equals the checkpoint read through CN B before B's replacement reader is admitted.

Evidence

  • PR #29350 UT failure: ddl_test.go:1065, expected checkpoint physical time 2026-09-24 18:14:08.700017 UTC, actual 18:14:11.701314 UTC. CN A's cancellation starts at 18:14:13.687 UTC.
  • PR #29345 UT failure: same assertion, expected 18:26:36.174918 UTC, actual 18:26:39.038878 UTC. CN A's cancellation starts at 18:26:45.522 UTC.
  • Both PRs change planner code, not the CDC test or CDC implementation.

The test switches its SQL executor to CN B before sampling checkpointA. Both checkpoint values in each failure predate A's cancellation. The first B-side catalog read can observe an older A checkpoint; a later B-side read observes A's newer committed progress. That does not show a regression of the durable CDC watermark.

Expected test contract

After A's reader has stopped, capture A's final durable checkpoint through CN A. Before releasing B's admission barrier, wait with a deadline for CN B to observe that same owner generation and checkpoint. Preserve the downstream assertions that B's first CollectChanges starts exactly there, B advances its owner generation and checkpoint, and A's delayed cleanup cannot overwrite B's progress.

The test should fail for a real missing, regressed, or changed-generation checkpoint, while ordinary cross-CN catalog visibility delay should not fail it.

Related product issue: #28268 concerns the NoFull creation boundary; this issue concerns the takeover UT synchronization.

Activity

  1. self-assigned this
    on Sep 24, 2026
  2. added
    kind/bug
    severity/s0
    on Sep 24, 2026
  3. added a commit that references this issue on Sep 25, 2026
    ce7f84d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugseverity/s0

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions