Skip to content

[Bug]: TestForwardLockUsesEffectiveLockDeadline returns lock timeout for uncontended forwarded holder #27810

Description

@gouhongshen

Is there an existing issue for the same bug?

  • I have checked the existing issues.

Branch Name

main

Commit ID

a273329dfe100fa13934ca6cc4a13c504ef1f728

Other Environment Information

  • Hardware parameters: GitHub-hosted Ubuntu x86 runner
  • OS type: Ubuntu
  • Others: MatrixOne ALL CI, Matrixone CI / UT Test on Ubuntu/x86, workflow run 33169880877 attempt 1, failed job 98844280790.

Actual Behavior

The Ubuntu race UT job failed pkg/lockservice.TestForwardLockUsesEffectiveLockDeadline in 1.72 seconds. The test creates an owner lock table, registers holder and waiter transactions, then performs an uncontended forwarded exclusive lock for holderTxn. That first lock unexpectedly returned ErrLockWaitTimeout:

service_forward_test.go:286: Received unexpected error:
    Lock wait timeout exceeded; try restarting transaction
--- FAIL: TestForwardLockUsesEffectiveLockDeadline (1.72s)
FAIL    github.com/matrixorigin/matrixone/pkg/lockservice  117.58s

The later waiter request is the operation that is supposed to return ErrLockWaitTimeout after the configured one-second effective deadline. The failure occurred before that assertion, so it does not prove the intended deadline propagation behavior.

This was observed on PR #27789, whose only diff is a fileservice lifecycle-test synchronization change. The failure is in pkg/lockservice; no lockservice production or test files are changed by the PR.

Expected Behavior

The uncontended forwarded holder lock should succeed. Only the subsequent waiter lock on the same row should return ErrLockWaitTimeout, after approximately one second and before three seconds.

Steps to Reproduce

1. Run MatrixOne ALL CI Ubuntu/x86 race UT at commit a273329dfe100fa13934ca6cc4a13c504ef1f728.
2. Execute pkg/lockservice, including TestForwardLockUsesEffectiveLockDeadline.
3. Observe the initial forwarded holder Lock call fail at service_forward_test.go:286 with Lock wait timeout exceeded.

Additional information

Metadata

Metadata

Assignees

Labels

ai-easyAI直接干,人扫一眼就行kind/bugSomething isn't workingseverity/s0Active / top priority for current sprint. Owner has committed to working on it now.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions