Skip to content

[Bug]: TestRequestCanBeFilter flaky — morpc method_based context deadline exceeded #27264

Closed

Description

@matrix-meow

Problem

TestRequestCanBeFilter in pkg/common/morpc/method_based_test.go:191 fails intermittently (0.12s):

Error: context deadline exceeded

The morpc method-based request filter test times out under CI load, likely due to timing races in RPC request processing.

Recent Occurrences

Date PR/Run Job
2026-08-18 PR #27227 UT Test on Ubuntu/x86

Related Closed Issues

Suggested Fix

  1. Increase context deadline tolerance for CI environments
  2. Or use explicit synchronization in tests instead of timing-based waits

Activity

  1. added
    kind/bug
    severity/s0
    on Aug 18, 2026
  2. jiangxinmeng1 commented on Aug 20, 2026

    @jiangxinmeng1
    Contributor

    fixed by #27302

  3. Ariznawlll commented on Aug 20, 2026

    @Ariznawlll
    Collaborator

    测试版本

    • 分支:main
    • commit:c8e3fa745a336a406a0d17f29c3c05fb48bd394c
    • 部署方式:MatrixOne Go 包级测试环境
    • 测试日期:2026-08-20

    原问题验证

    在当前 main 对原问题对应的 morpc 测试执行:

    go test ./pkg/common/morpc -run '^TestRequestCanBeFilter$' -count=100
    go test -race ./pkg/common/morpc -run '^TestRequestCanBeFilter$' -count=100

    普通测试 100/100 通过,race 测试 100/100 通过,未出现 context deadline exceeded、超时或 panic。

    Happy Path 覆盖

    1. TestRequestCanBeFilter 在 100 次普通执行中均正确完成。
    2. 同一测试在 race 检测下重复 100 次均完成,结果稳定。

    Unhappy Path 覆盖

    该 issue 是测试时序 flaky,不涉及用户 SQL 或数据写入拒绝路径;非法 SQL、事务回滚和数据原子性不适用。

    白盒验证

    已执行普通和 -race focused Go 测试,各 100 次,均通过。

    回归测试

    保留在 MatrixOne pkg/common/morpc UT/race 回归中;该问题属于内部生命周期测试,不新增 MOTR SQL 用例。

    测试证据

    go test 输出:普通 ok .../pkg/common/morpc 1.607s;race ok .../pkg/common/morpc 2.970s。

    测试结论

    测试通过。

  4. iamlinjunhong commented on Aug 26, 2026

    @iamlinjunhong
    Contributor

    New CI occurrence on PR #27619 (head 97c97cb): Matrixone CI / UT Test on Ubuntu/x86, run 32942559663 job 98096435024.

    Failure: TestRequestCanBeFilter expected a joined pair of context deadline exceeded errors but received one context deadline exceeded error at pkg/lockservice/rpc_test.go:1138. CI command: make ut UT_PARALLEL=8 UT_TIMEOUT=40.

    The PR changes only MySQL BIT_XOR parser/window coverage and does not touch lockservice or its callers. Using mo-cgo-test with -race -count=1 -parallel=8 -timeout=120s -run ^TestRequestCanBeFilter$ ./pkg/lockservice, the test passed 3/3 on this PR head and 3/3 on clean current up/main a53f5a3. This is another flaky CI occurrence.

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

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions