Skip to content

IGNITE-29233 Fix explicit lock left acquired when its timeout expires during mapping - #13775

Open
NSAmelchev wants to merge 14 commits into
apache:masterfrom
NSAmelchev:ignite-29233
Open

NSAmelchev wants to merge 14 commits into
apache:masterfrom
NSAmelchev:ignite-29233

Conversation

@NSAmelchev

@NSAmelchev NSAmelchev commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

A timed out GridDhtColocatedLockFuture completes without synchronizing with the mapping thread: if the timeout expires while the keys are still being mapped, undoLocks finds nothing yet and the mapping then registers the candidates for the completed future. tryLock returns false, but the key stays locked with no owner, and the next partition map exchange waits for it forever. A reentry of a key the thread already holds leaks the same way.

Changes

  • The mapping and cancel() of an explicit lock are serialized with the timeout callback on the timeout object monitor: a completed future registers nothing, everything registered before is undone by the completion. Transactions are not affected, they release their candidates on rollback.
  • A key the thread already holds is reentered when the lock is acquired, not during the mapping: a failed attempt has nothing to release on it.

Visible behavior: tryLock(timeout) paused during mapping longer than the timeout may return true after the timeout instead of returning false and leaving the key locked.

@NSAmelchev
NSAmelchev force-pushed the ignite-29233 branch 3 times, most recently from a1974df to 55e2b94 Compare November 5, 2026 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant