Skip to content

[Bug]: cross-PR UT failures in TestExecuteIteration1|TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges and S3FS range merge fallback #27120

Closed

Description

@XuPeng-SH

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main baseline, reproduced across multiple PR merge-test commits:

Commit ID

Other Environment Information

  • Hardware parameters: GitHub-hosted Ubuntu runner
  • OS type: Ubuntu/Linux x86
  • Others: MatrixOne CI Matrixone CI / UT Test on Ubuntu/x86; failures reproduced across independent PR runs

Actual Behavior

Two UT cases fail across different PRs that do not modify the affected code paths:

  1. TestExecuteIteration1 fails with a deterministic count mismatch:

    expected: 2
    actual  : 3
    Test: TestExecuteIteration1
    

    The failure is in pkg/vm/engine/test/publication_test.go:788. It occurred in both PR fix(compile): normalize materialized CTE spill rejection #27109 and PR fix(compile): partition generate_series offsets across CNs #27069.

  2. TestS3FSRangeMergeWaitHasBoundedFallback fails with:

    range follower rejoined a timed-out merge generation
    

    It occurred in both PR fix: unify decimal and string coercion domains #27093 and PR fix(compile): normalize materialized CTE spill rejection #27109.

These are not PR-specific failures: the involved PRs change materialized CTE compilation, generate_series partition routing, and decimal/string coercion respectively, while the failing tests are in publication/engine and fileservice code.

Expected Behavior

Both tests should pass reliably on the CI baseline and across unrelated PRs. If the behavior is intentionally changed, the expected values and test contract must be updated explicitly.

Steps to Reproduce

  1. Run the Ubuntu/x86 UT job on PR fix(compile): normalize materialized CTE spill rejection #27109 or PR fix(compile): partition generate_series offsets across CNs #27069.
  2. Inspect the Unit Testing step and the FAIL_UT_CASES output.
  3. Observe TestExecuteIteration1 failing with expected: 2, actual: 3.
  4. Run the same UT job on PR fix: unify decimal and string coercion domains #27093 or PR fix(compile): normalize materialized CTE spill rejection #27109.
  5. Observe TestS3FSRangeMergeWaitHasBoundedFallback failing with range follower rejoined a timed-out merge generation.

Relevant CI jobs:

Additional information

  • TestExecuteIteration1 was also observed in the same historical job family on more than one PR, so it must not be waived as a PR-only failure.
  • TestS3FSRangeMergeWaitHasBoundedFallback was also observed on more than one PR; its log shows a timed-out merge generation being rejoined.
  • Separate Iceberg/HAKeeper timeout failures in the same jobs are intentionally not included here; they are infrastructure/cluster-lifecycle failures rather than these two reproducible UT cases.
  • The issue is assigned S0 because it blocks reliable CI validation across unrelated PRs and includes a persistent engine test contract mismatch.

Activity

  1. added
    kind/bug
    severity/s0
    on Aug 13, 2026
  2. XuPeng-SH commented on Aug 13, 2026

    @XuPeng-SH
    ContributorAuthor

    Root-cause update for TestExecuteIteration1:

    The expected: 2 / actual: 3 assertion is an iteration-state mismatch, not a row/count mismatch:

    • expected publication.IterationStateCompleted (2)
    • actual publication.IterationStateError (3)

    The causal error appears earlier in both unrelated CI jobs:

    failed to apply object list: internal error: CCPR durable cleanup owner is not configured
    

    This behavior was introduced by #26905 (c3ba9c7df14388956cb38d78681c6c35b75c42b8, merged 2026-08-11), which added fail-closed validation for durable CCPR tombstone-cleanup ownership. A cleanup owner is rejected when TNShardID == 0, while the shared engine test harness currently configures its TN service with ShardID: 0 in pkg/vm/engine/test/testutil/util.go.

    The failure is conditional: it is reached only when the third replication iteration produces a non-appendable tombstone rewrite. That explains why the same test passes in many runs but fails under some race-enabled CI timings. On the clean PR #27069 base (c21d44189f5c6cab4cd4d5a277ba9867d0d47b34), a focused -race run plus 10 consecutive focused -race repetitions all passed, while two unrelated CI runs reached the tombstone path and failed with the identical owner error:

    Classification: this is a recently introduced flaky test/harness regression, not a PR #27069 or PR #27109 product-code regression. The current evidence does not indicate a production failure: production TN shards are expected to have a non-zero ID, while this failure comes from the test harness's synthetic zero shard ID.

    Suggested fix:

    1. Configure a valid non-zero TN shard ID for this CCPR test (prefer the narrowest scoped fixture change).
    2. Add deterministic coverage that forces the non-appendable tombstone rewrite path, so the durable-owner contract is exercised on every run rather than depending on checkpoint timing.
    3. Keep the production fail-closed check; do not weaken it or handle this with retries.
  3. iamlinjunhong commented on Aug 13, 2026

    @iamlinjunhong
    Contributor

    Additional reproduction from PR #27053 (head 93c33b9296f8459f6a2999b3bbe16ea62d094d62):

    Clean current-main comparison:

    • origin/main: 0fc87ec145574bca4ddd5b496e4349894a6e9f5d
    • Clean detached worktree; git status --short --untracked-files=all empty.
    • Reproducer: .agents/skills/mo-dev/scripts/mo-cgo-test -race -v -count=100 -failfast -timeout=1200s -run ^TestExecuteIteration1$ ./pkg/vm/engine/test
    • Result: first iteration passed, second iteration reproduced the identical assertion at publication_test.go:788 (expected: 2, actual: 3), package failed after 11.294s.
    • A preceding full-package main comparison, .agents/skills/mo-dev/scripts/mo-cgo-test -race -v -count=1 -timeout=2400s ./pkg/vm/engine/test, passed in 331.301s, confirming the timing-dependent/flaky character described above.

    This independently confirms that PR #27053 did not introduce the failure. I will request one failed-job rerun for run 31713840402 after recording this evidence.

  4. changed the title [-][Bug]: cross-PR UT failures in TestExecuteIteration1 and S3FS range merge fallback[/-] [+][Bug]: cross-PR UT failures in TestExecuteIteration1|TestIssue26640ClusterRestoreRebindsSubscriptionPrivileges and S3FS range merge fallback[/+] on Aug 13, 2026
  5. iamlinjunhong commented on Aug 14, 2026

    @iamlinjunhong
    Contributor

    Additional evidence from PR #27016 (head 8bb792bab66b716e947a6b61cc174d44cc2aed06):

    Attribution evidence:

    • PR fix(frontend): align string metadata length with collation #27016 changes only pkg/frontend/mysql_protocol.go, pkg/frontend/util.go, and pkg/frontend/util_test.go; the failing execution path is the CCPR engine test fixture already tracked here.
    • This issue already contains an identical clean-main -race -count=100 reproduction at 0fc87ec145574bca4ddd5b496e4349894a6e9f5d.
    • Current upstream main is 2909687dc7a5fbd1d39a19c44aeff63a8d6e333b. The causal files (pkg/publication, pkg/vm/engine/test/publication_test.go, pkg/vm/engine/test/testutil, and pkg/objectio/ioutil/unpublished_cleanup.go) have no changes between that reproduced main baseline and current main.
    • In a current-main detached worktree with tracked status clean, focused non-race -count=10 passed 10/10 and focused -race -count=100 -failfast passed 100/100 (467.500s). This negative sample is consistent with the conditional timing-dependent tombstone path documented here; it does not alter the prior exact clean-main reproduction.

    Conclusion: this is the same known test-fixture flake, not caused by PR #27016. No PR code change was made. I am requesting one failed-job rerun for run 31780133214 after recording this evidence.

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