Skip to content

[Bug]: TestRPCSendWithNotSupport is flaky under CI load #25578

Closed

Description

@XuPeng-SH

Is there an existing issue for the same bug?

I have checked the existing issues.

Branch Name

main

Commit ID

5222247

Other Environment Information

  • Hardware parameters: GitHub-hosted Ubuntu/x86 runner
  • OS type: Linux
  • Others: MatrixOne CI / UT Test on Ubuntu/x86

Actual Behavior

TestRPCSendWithNotSupport intermittently fails in the lockservice unit-test package:

[TEST]: TestRPCSendWithNotSupport
[RESULT]: fail
[ELAPSED]: 0.19
rpc_test.go:321: Error: Should be true
--- FAIL: TestRPCSendWithNotSupport (0.19s)

The test expects the server's moerr.ErrNotSupported, but the request context has a fixed 100 ms deadline. Under CI scheduling or RPC startup delay, the deadline can win before the server response is decoded, so the assertion receives a transport/context error instead of the error that the test intends to validate.

The failure was observed in:
https://github.com/matrixorigin/matrixone/actions/runs/29087118926/job/86343372131?pr=25577

PR #25577 only changes planner/index files, so this is an unrelated lockservice test flake on main.

Expected Behavior

Tests that validate a concrete RPC response should use a generous upper bound that prevents hangs without treating normal CI scheduling delay as product behavior. Tests that intentionally validate timeout behavior should retain a short deadline.

Steps to Reproduce

  1. Run go test ./pkg/lockservice -run '^TestRPCSendWithNotSupport$' -count=100.
  2. Run under CPU contention or a loaded CI runner.
  3. Observe that the 100 ms request deadline can expire before the server's unsupported-method response arrives.

The race is environment-dependent; 100 local repetitions may pass on an idle machine.

Additional information

The same file previously extended comparable response-based lockservice tests from 100 ms to 10 seconds in #19412, but this test and several other response-based RPC tests were missed.

The systematic fix should:

  • use a shared generous timeout for RPC tests that expect a server response;
  • preserve the short timeout in TestRequestCanBeFilter, where expiration is the behavior under test;
  • improve the assertion so future failures include the actual returned error;
  • run repeated and race-enabled lockservice tests.

Activity

  1. added
    kind/bug
    on Jul 10, 2026
  2. added theissue type on Jul 10, 2026
  3. added
    severity/s0
    and removed on Jul 10, 2026
  4. self-assigned this
    on Jul 10, 2026
  5. added this to the MO-202607 milestone on Jul 10, 2026
  6. added a commit that references this issue on Jul 10, 2026
    85c0eef
  7. added 3 commits that reference this issue on Sep 17, 2026
    9f10273
    561ea34
    e434f80
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

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions