Skip to content

[4.2-dev] test(morpc): stabilize blackholed timeout tests - #33122

Merged
XuPeng-SH merged 1 commit into
matrixorigin:4.2-devfrom
XuPeng-SH:codex/morpc-flaky-42
Nov 24, 2026
Merged

XuPeng-SH merged 1 commit into
matrixorigin:4.2-devfrom
XuPeng-SH:codex/morpc-flaky-42

Conversation

@XuPeng-SH

@XuPeng-SH XuPeng-SH commented Nov 24, 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:

Refs #32744. Related failure: #32849.

What this PR does / why we need it:

The 4.2-dev blackholed-backend timeout tests can expire their short request deadline before the writer sends the request. In that ordering no data write is recorded, so the expected liveness probe cannot run. The observed CI failure is consistent with this ordering; its log does not record the writer's exact state.

For the two related liveness tests, wait until the peer has decoded the user request, then explicitly expire a test context whose transport deadline remains far in the future. Keep the checks for retained pending data, a fresh probe decision after Future removal, draining, inactivity, and rejection of new work. The test starts the real read loop only after the Future is removed and confirms admission is still open, so the first timeout must initiate draining in that state. Keep the continuous case's original approximate 5 ms request cadence. The change is limited to test code.

Validation

  • A controlled writer barrier reproduced the missing-probe failure when the request expires before the write. With the fix, the original test passed under -race with the writer deliberately held for 30 ms.
  • Both affected tests passed independently with -race -count=100. Temporary mutations that removed the pending latch or suppressed probes after Future removal each failed the target test as expected. Controlled mutations that suppress either probing or the initial drain transition when no Future remains each fail the revised test.
  • Complete ./pkg/common/morpc passed with -race -short -tags matrixone_test -count=1 on Go 1.26.6/Linux amd64.
  • Incremental gofmt, git diff --check, repository err-check, go vet, pinned molint, and pinned golangci-lint passed for ./pkg/common/morpc.

@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 commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

This pull request is merged.

@XuPeng-SH
XuPeng-SH marked this pull request as draft November 24, 2026 03:16
@XuPeng-SH
XuPeng-SH marked this pull request as ready for review November 24, 2026 03:24
@XuPeng-SH
XuPeng-SH force-pushed the codex/morpc-flaky-42 branch from 2f0f8d9 to 76a8f2c Compare November 24, 2026 03:24
@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 →

@XuPeng-SH

XuPeng-SH commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor Author

mo-bot review · mo-bot-local · done

Commit: 76a8f2cee5991b854a0909164f935a4712168076

Review completed. Read the assessment.

@XuPeng-SH XuPeng-SH left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mo-bot review · mo-bot-local · review

Commit: 76a8f2cee5991b854a0909164f935a4712168076

Assessment: approve

Waiting for peer receipt before expiring the request removes the short-deadline race from the test setup. The revised tests still verify that the backend probes and drains after the last Future is removed, and that continuous writes cannot postpone the probe.

Model: gpt-6.2-sol / xhigh

Session: 01a1f0a0-5126-78f3-9ab8-ef4e87f2f119 · slot 0 · generation 3

Validation:

  • Each affected test passed 100 race-enabled repetitions. The full MORPC package passed with -race -short -tags matrixone_test on Go 1.27.1.

  • Two diagnostic mutations failed at the expected assertions. Refreshing the oldest pending-write timestamp postponed the probe, and requiring a live Future suppressed it after Future removal.

  • Isolation preflight, frozen patch and policy checks, and coverage of all four discussion entries passed. Commands, source hashes, exits, and terminal logs were reconciled in validation-audit.stdout and receipt 1795493613724256156-2.

Limitations:

  • The historical CI log does not establish the writer's exact state at expiration. The supplied evidence did not include the body or log for the related failure linked as #32849.

@XuPeng-SH
XuPeng-SH merged commit 9ed1645 into matrixorigin:4.2-dev Nov 24, 2026
@XuPeng-SH
XuPeng-SH deleted the codex/morpc-flaky-42 branch November 24, 2026 04:20

This branch was previously deployed

1 inactive deployment
ci — 76a8f2ce Deployed Nov 24, 2026 by XuPeng-SH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/test-ci size/M Denotes a PR that changes [100,499] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants