Skip to content

fix(test): remove unused CDC transaction helper - #28548

Closed
gouhongshen wants to merge 0 commit into
matrixorigin:mainfrom
gouhongshen:agent/issue-28546-a18658ba
Closed

gouhongshen wants to merge 0 commit into
matrixorigin:mainfrom
gouhongshen:agent/issue-28546-a18658ba

Conversation

@gouhongshen

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Test and CI
  • Feature
  • Code Refactoring

Which issue(s) this PR fixes:

Related to #28546

What this PR does / why we need it:

Root cause

pkg/tests/issues/issue_27666_test.go retained execInternalTxnSQL after commit 7f173b4d524 changed its only call site to execInternalTxnSQLWithAffectedRows so the CDC race fixture could record affected rows. The wrapper had no callers and the arm64 SCA unused analyzer rejected the package.

Changes

  • Remove the orphan execInternalTxnSQL wrapper.
  • Keep execInternalTxnSQLWithAffectedRows as the single implementation and active caller.
  • No production CDC code, SQL behavior, lock behavior, or test fixture behavior changes.

Issue-to-test proof

  • [Bug]: Ubuntu/x86 arm64 SCA fails on unused CDC test helper #28546: the existing TestCDCRaceTxn unit test exercises the active transaction fixture across success, startup failure, statement failure, partial initialization, commit failure, cancellation, repeated joins, and cleanup; the existing TestIssue27666CDCWatermarkWriteSerializesWithDrop regression exercises both drop_wins and writer_wins two-CN orderings and asserts zero residual task and watermark rows.
  • The static-analysis contract is directly verified by the package lint run reporting zero issues, including unused.
  • No BVT was added because this is a test-only static-analysis cleanup with no public SQL contract change.

Validation

  • make cgo NATIVE_BUILD_JOBS=4 — pass on macOS arm64; native headers and libraries generated with repository provenance.
  • .agents/skills/mo-dev/scripts/mo-cgo-test -list '^(TestCDCRaceTxn|TestCDCWaiterProbe|TestIssue27666CDCWatermarkWriteSerializesWithDrop)$' ./pkg/tests/issues — selected all three tests.
  • .agents/skills/mo-dev/scripts/mo-cgo-test -v -count=1 -timeout=120s -run '^(TestCDCRaceTxn|TestCDCWaiterProbe)$' ./pkg/tests/issues — pass.
  • .agents/skills/mo-dev/scripts/mo-cgo-test -v -count=1 -timeout=240s -run '^TestIssue27666CDCWatermarkWriteSerializesWithDrop$' ./pkg/tests/issues — pass; both subtests pass.
  • CGO_CFLAGS="-I$PWD/cgo -I$PWD/thirdparties/install/include" CGO_LDFLAGS="-L$PWD/thirdparties/install/lib" golangci-lint run -v --concurrency 1 -c .golangci.yml ./pkg/tests/issues — pass; 0 issues.
  • git diff --check — pass.

Residual risks

The local checks ran on macOS arm64; the reported failure is from Ubuntu arm64 CI, so the upstream CI SCA job remains the platform-specific confirmation. The diff removes only an unreferenced test helper and has no runtime or compatibility surface.

@gouhongshen

gouhongshen commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Workflow attempt 2 has completed and failed. The original attempt 1 pkg/logservice race tracked by #28550 did not recur; attempt 2 instead exposed a distinct unrelated blocker in the Ubuntu/x86 UT job: pkg/tests/issues/TestIssue28313EmptyRemoteDispatch failed with removed shuffle receiver errors, connector cleanup timeout, and MORPC stream closures. Existing issue #28313 now records this occurrence. CI Required only propagated the UT failure. The workflow is at attempt 2, so no further rerun is permitted.

@gouhongshen gouhongshen closed this Sep 9, 2026
@gouhongshen
gouhongshen force-pushed the agent/issue-28546-a18658ba branch from 19b1c00 to 7c643f4 Compare September 9, 2026 23:28

This branch was previously deployed

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

Labels

kind/test-ci size/XS Denotes a PR that changes [1, 9] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants