Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
12.3.2
-
Related to performance
-
Spin on each lock release to try to make releasing all transactional locks more robust to transients, reducing the probability of taking an exclusive latch later
-
Q3/2026 Server Maintenance
Description
lock_release_try() and lock_release_on_prepare_try() are used as deadlock-risk-free attempts to avoid taking exclusive lock_sys.latch for the lock-release operation.
The functions make use of the "try-acquire" mechanism to query for a specific latch/mutex status and not wait on the resource, in case it's not free.
It may be that instead of failing on the first check, retries (with a small PAUSE in between) can be done, to make the mechanism more robust to transients.
This worsen the latency in the worst case scenario, but hopefully improves the common case, reducing the escalations to write-latching lock_sys.latch.
A buggish and to be fine-tuned implementation is provided in commit 51bbb90 (only the lock_release_try() bits were positively tested, no coverage for lock_release_on_prepare_try()).
Attachments
Issue Links
- blocks
-
MDEV-40209 InnoDB lock release escalates to exclusive lock_sys.latch too eagerly under concurrency
-
- Closed
-
- relates to
-
MDEV-20612 Improve InnoDB lock_sys scalability
-
- Closed
-
-
PERF-475 Loading...