Skip to content

[Bug]: Multi-CN BVT can grant a contended decimal GET_LOCK unexpectedly #28817

Closed as not planned

Description

@XuPeng-SH
  • I have checked existing issues.

Branch Name

main (observed while testing PR #28799)

Commit ID

6cad156

Other Environment Information

Actual Behavior

In test/distributed/cases/function/user_lock.sql, row 96 acquires user_lock_bvt_decimal_timeout_busy on session 1 with timeout 0 and returns 1. Row 99 then calls get_lock(..., 0.5) on session 2 while session 1 has not yet run the release at row 102. The failing report expected 0 but got 1. The whole script took 0.364s, so the contended call did not wait for the expected one-second DECIMAL timeout.

The mo-tester artifact shows it executes each statement synchronously and retains indexed connections for the script; it provides no evidence that the release statement ran before row 99 completed.

Expected Behavior

While session 1 holds the lock, session 2 should not acquire it. DECIMAL timeout 0.5 rounds to a one-second wait; with the owner still holding the lock, the call should time out and return 0.

Steps to Reproduce

  1. Run test/distributed/cases/function/user_lock.sql in the standalone Compose multi-CN PESSIMISTIC BVT topology.
  2. Capture both sessions' connection IDs, session IDs, serving CN UUID/address, user-lock owner/connection identity, lock-service ID and lock key/holder around rows 96, 99, and 102.
  3. Repeat until the unexpected acquisition is reproduced.

Additional information

The same scenario passed in run 34700640802 (standalone PESSIMISTIC BVT); that script took 1.233s and all 61 statements passed. The PR #28799 diff only changes mpool code, and the BVT failure is not currently attributed to that diff. Root cause is unknown: determine whether session/owner identity, CN routing/migration, lock-service state, or another factor allowed session 2 to acquire the row. Do not change the expected result or classify this as a CI flake without establishing why the lock was available.

Activity

  1. self-assigned this
    on Sep 13, 2026
  2. added
    kind/bug
    on Sep 13, 2026
  3. XuPeng-SH commented on Sep 13, 2026

    @XuPeng-SH
    ContributorAuthor

    Duplicate of #28808. The new CI observation from PR #28799 (run 34731351092) and comparison run 34700640802 have been consolidated into #28808. The unexpected GET_LOCK result is still under investigation there; no root cause or PR #28799 causal link is claimed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions