Skip to content

[Bug]: TestWatermarkBatchYieldsToRetirement expires on subsequent flush in race UT #32324

Closed as not planned

Description

@ck89119

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Searched open and closed issues for the exact test name, WatermarkBatch, watermark/retirement and watermark/deadline. Closed #31301 concerns the same test but txn need retry in rc mode; closed #30350 concerns different watermark-wait tests. Neither tracks this subsequent-flush deadline signature.

Branch Name

issue-32219-main, PR #32261 targeting main.

Commit ID

Checked CI head: d4165a95856940f98c25746154b7dda0c3339c5e.
Exact target-parent control: a86c130cc09c5859e1651d49746a35bc79c2c07a.

Other Environment Information

Actual Behavior

The complete failed-job log identifies exactly one failing test:

--- FAIL: TestWatermarkBatchYieldsToRetirement (105.36s)
watermark_contention_test.go:151
Received unexpected error: context deadline exceeded

This is the subsequent require.NoError(t, flush()), after retirement commits and the test checks that the deliberately failed first watermark batch did not persist a prefix. The context has a 30-second budget created after embedded-cluster startup. The 105.36-second total also includes setup/cleanup; it is not a 105-second flush measurement.

The case ran approximately 2026-11-06 03:43:24.603–03:45:10.859 UTC. The assertion is logged at 03:44:34.04 UTC. Nearby logs include Raft/HAKeeper timeouts and background ISCP invalid timestamp errors; these are correlations, not a proven root cause. The final job failure/report was emitted at 04:56 UTC, substantially later than the test event.

The UT process exits nonzero; CI Required fails as a consequence. No race-detector finding, compile failure or OOM kill explains this particular assertion. SCA, the separate UT-coverage lane and enabled BVT lanes pass at the same PR head.

Expected Behavior

The contention/rollback test should deterministically verify retirement and subsequent watermark progress without depending on full-suite scheduling. Preserve atomicity and cleanup assertions; do not hide the failure with sleeps, arbitrary timeout increases, ignored errors or skipped cases.

Steps to Reproduce

The linked Linux full-suite run is the confirmed failure. Select the existing test with matching native prerequisites and the CI race/short/tag mode:

GOTOOLCHAIN=go1.27.1 GOWORK=off \
  .agents/skills/mo-dev/scripts/mo-cgo-test \
  -race -short -tags matrixone_test -count=1 -json -timeout=40m \
  -run '^TestWatermarkBatchYieldsToRetirement$' ./pkg/iscp

This is an intermittent full-suite failure candidate, not a deterministic local reproducer.

Additional information

Local controls completed without source/assertion changes, on Darwin/arm64, Go 1.27.1, CGO, GOMAXPROCS=4, with the exact race/short/tag selection, -p 1 -count=3 -json -timeout=10m:

  • Exact PR head: three passes, 8.07s / 7.00s / 8.04s, exit 0.
  • Independently checked-out, clean exact target parent: three passes, 7.45s / 7.08s / 7.20s, exit 0.
  • The two commands ran sequentially and the six owned two-CN clusters released their resources. Platform, suite contention and package concurrency differ from CI. These passes do not reproduce the Linux failure on main or prove its root cause/fix.

The complete PR delta is 13 Top-K pruning/codec/reader/test files. ISCP's test, watermark batch/transaction/SQL owners, lockservice, transaction client, embed harness and SQL executor are byte-identical to the exact target parent. The failed flush executes primary-key UPDATEs with JSON integer fields; the fixture's validation queries use COUNT, not ORDER BY/LIMIT. They do not exercise the changed Top-to-scan admission, Top-value encoding or ordered block filtering. The unchanged unordered reader advances without a block permutation or threshold. No demonstrated causal path to the Top-K change was found; this is not a claim that source identity alone proves universal causal independence.

The root cause remains open for the ISCP/CI owner. No unrelated ISCP product/test edits are proposed in #32261. After recording this issue, a single targeted rerun of the failed UT job is planned; a repeated failure requires further evidence, not an unlimited rerun loop.

Activity

  1. added
    kind/bug
    on Nov 6, 2026
  2. XuPeng-SH commented on Nov 12, 2026

    @XuPeng-SH
    Contributor

    合并范围记录:#32574 已合入 main(4760bcaa88b23fabe064b1631b624c0e8c40d549)。该 PR 给 watermark 测试的最终 DROP 使用独立、有界清理上下文,并明确保留本 issue:其核对认为报告行是已接近耗尽共享上下文的最终 DROP;慢服务端操作原因和未知提交结果尚未查明。该分析与原正文对 subsequent flush 的定位存在差异,不能据此宣告原失败已完整修复。本轮只核查远端状态和修复说明,未新跑测试。保持研发负责人及开放状态,后续需核清原失败具体语句、等待点和最终事务结果。

  3. XuPeng-SH commented on Nov 14, 2026

    @XuPeng-SH
    Contributor

    Consolidated into the main flaky CI/UT dynamic tracker; this standalone report is no longer tracked separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugneeds-triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions