Skip to content

test(tae): TestSnapshotGC waits for global checkpoint quiescence #26098

Closed

Description

@LeftHandCold

CI flaky test synchronization bug; detailed root cause and fix plan will be added in a comment.

Activity

  1. LeftHandCold commented on Jul 23, 2026

    @LeftHandCold
    CollaboratorAuthor

    Failure

    TestSnapshotGC is flaky in CI. The failing job ID is 89157452007 from workflow run 29992210598.

    target LSN: 221, checkpointed LSN: 116, current LSN: 222, pending LSN count: 106
    

    Root cause

    After its concurrent append and snapshot workload, the test calls testutil.WaitAllCheckpointsFinished. The helper requires a global quiescent state: the captured WAL target is checkpointed, the live WAL has no pending entries, and the current incremental checkpoint intent is finished.

    The test enables the quick checkpoint configuration: MinCount=1, IncrementalInterval=20ms, GlobalMinCount=1. It also creates a large concurrent WAL burst. In the failing job, the first incremental checkpoint reached LSN 116 and a global checkpoint started, but the ten-second global-quiescence wait expired before the remaining target WAL was checkpointed. There was no checkpoint or GC error, panic, or data-correctness assertion.

    This is a test synchronization-contract bug, not evidence of a production GC runtime failure. It is unrelated to PR #26033: that PR changed only TestAppendAndGC2, and both TestAppendAndGC and TestAppendAndGC2 passed in this failing job.

    Fix

    Change only TestSnapshotGC. After all test workers finish, force and await an incremental checkpoint covering db.TxnMgr.Now() with a bounded context. Keep the subsequent GC and snapshot assertions unchanged. Do not change production GC, checkpoint, or WAL behavior.

    Validation

    • Repeated TestSnapshotGC execution
    • Targeted GC and checkpoint regression tests
    • CGo test and race test for the touched package
  2. added
    kind/bug
    on Jul 23, 2026
  3. added a commit that references this issue on Jul 24, 2026
    628313f
  4. added 3 commits that reference this issue on Sep 17, 2026
    a174042
    c0a521d
    eddbc40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions