Skip to content

fix(iscp): avoid reporting timeout causes early - #29424

Merged
XuPeng-SH merged 5 commits into
matrixorigin:mainfrom
jiangxinmeng1:codex/fix-29392-iscp-timeout-cause
Oct 3, 2026
Merged

XuPeng-SH merged 5 commits into
matrixorigin:mainfrom
jiangxinmeng1:codex/fix-29392-iscp-timeout-cause

Conversation

@jiangxinmeng1

@jiangxinmeng1 jiangxinmeng1 commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

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

Which issue(s) this PR fixes:

Fixes #29392

What this PR does / why we need it:

Passing moerr.NewInternalErrorNoCtx(...) inline to context.WithTimeoutCause invokes the error reporter while constructing the argument. Healthy ISCP operations therefore emit timeout-error telemetry before their context expires.

Reuse five causes in the existing moerr cause inventory at all five ISCP timeout sites. Timeout durations, error text, context cancellation, tenant handling and transaction cleanup retain their existing behavior. This avoids repeated error construction, stack capture and reporting on normal operations; no throughput improvement is claimed without measurement.

The cause regression checks a dynamic-error reporting control, healthy contexts, and actual timer expiry with the exact supplied cause. It restores the reporter and releases timers even after a failed assertion. The existing GetTaskRunner success test additionally requires zero error reports. The transaction-finish tests share one five-case matrix for successful commit, commit failure, canceled operation, canceled success and joined operation/rollback failure. Each checks zero construction-time reports, original error identities, the selected commit/rollback action, a healthy cleanup context at the actual call, and cancellation after cleanup. No new service fixture or production test seam is introduced.

The PR is based on main 7ff3eac2e8f1. The TAE promotion/configuration files match main, including its strict four-point validation; this PR changes only moerr and ISCP. No data format or schema change.

Validation on Go 1.26.4, macOS arm64, fresh repository-native CPU libraries:

  • All pkg/common/moerr tests and go vet passed.
  • All pkg/iscp tests passed through mo-cgo-test, with -vet=all.
  • A single reverse-control experiment restored the old inline constructor at GetTaskRunner; the consumer test failed on one spurious report. Restoring the fix made the owning-package run pass.
  • Main's TestPromotionSettingsDomains and the persisted replay short_decay_points / extra_decay_points cases passed.
  • Incremental golangci-lint for both changed packages: 0 issues; gofmt and diff whitespace checks passed.
  • Historical overall review: gpt-6-astra / xhigh, no unresolved material blockers at bd07a6c939.

No new service-level fulltext/drop/recreate log-count replay or benchmark was run.

Additional validation on Linux amd64, Go 1.26.4 and fresh matching repository-native CPU libraries:

  • Complete moerr and ISCP packages passed with -count=1 -vet=all; the updated ISCP package passed again after the transaction-test consolidation.
  • Complete moerr and ISCP packages passed under race; cause, task-runner and transaction-finish regression tests each passed 100 bounded race repetitions.
  • A reverse control restored the old transaction-finish constructor: all five cases failed specifically on one unexpected report. The task-runner reverse control likewise failed on one unexpected report.
  • External QA covered all five causes with explicit cancel, inherited parent-cancel cause, deadline cause attachment, stable internal error codes/text, and explicit reporting of actual failures.
  • Incremental vet/lint and repository make err-check passed; lint reported zero issues.
  • Historical exact-head CI service logs span startup through shutdown on both CNs (about 41 minutes), contain 149 / 3,000 ISCP-Task occurrences, and contain zero occurrences of all five timeout strings. This corroborates the construction-reporting fix under existing BVT activity; it is not a dedicated controlled workload or latency benchmark.
  • Solution/design and final overall review: separately invoked gpt-6.1-sol / xhigh, PASS with no unresolved material blockers. Delivered revision bc8f2b7c4335b727ff8387fea10c8a4a91a9e617 exactly matches the reviewed source fingerprints; full base-to-head diff SHA-256 4300c0b5ce4e4d71f8a151af1635f6d49f5c90ac4d3fd7b2153ee6a4a0c41dbe.

CI attribution for historical head bd07a6c939 in run 37131974801: SCA and UT coverage passed. Pessimistic BVT failed the first prepared JDBC STATISTICS execution in pub_sub4.sql (expected three index rows, returned zero); subsequent local/subscription executions passed. Coverage aggregation then failed because a required producer was incomplete, without calculating a coverage verdict. Attribution of the metadata failure is unresolved; it is not labeled pre-existing or dismissed as infrastructure. The PR does not change the planner/frontend/metadata test paths. CI for the follow-up revision is pending and has not been awaited.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@mergify mergify Bot added the kind/bug Something isn't working label Sep 28, 2026
@matrix-meow matrix-meow added the size/S Denotes a PR that changes [10,99] lines label Sep 28, 2026
@matrix-meow matrix-meow added size/M Denotes a PR that changes [100,499] lines and removed size/S Denotes a PR that changes [10,99] lines labels Sep 28, 2026
@matrix-meow matrix-meow added size/M Denotes a PR that changes [100,499] lines and removed size/S Denotes a PR that changes [10,99] lines labels Oct 3, 2026
@mergify mergify Bot added the queued label Oct 3, 2026
@mergify

mergify Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-10-03 17:47 UTC · Rule: main · triggered by rule Automatic queue on approval for main
  • 🟠 Checks running · in-place
  • 🚫 Left the queue — 2026-10-03 18:58 UTC · at 74869f4fc163428bb64a5b9d84b23dcb1c89a668

This pull request spent 1 hour 11 minutes 4 seconds in the queue, with no time running CI.

Reason

Pull request #29424 has been dequeued

Pull request from fork cannot be queued. This pull request comes from a fork, and Mergify needs the author's permission to update its branch.

The author needs to enable "Allow edits from maintainers" on this pull request.

Hint

You should look at the reason for the failure and decide if the pull request needs to be fixed or if you want to requeue it.
If you do update this pull request, it will automatically be requeued once the queue conditions match again.
If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio queue comment.

Waiting for any of
  • check-neutral = CI Required
  • check-skipped = CI Required
  • check-success = CI Required
All conditions

Tick the box to put this pull request back in the merge queue (same as @mergifyio queue).

  • Requeue this pull request

This branch was previously deployed

1 inactive deployment
ci — 74869f4f Deployed Oct 3, 2026 by XuPeng-SH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ISCP timeout causes are reported immediately before timeout

3 participants