Details
-
Task
-
Status: Stalled (View Workflow)
-
Critical
-
Resolution: Unresolved
Description
Currently typical MDL lock acquisition is as follows:
MDL_request mdl_request;
|
MDL_REQUEST_INIT(&mdl_request, namespace, db, object, lock_type, duration);
|
if (mdl_context.acquire_lock(&mdl_request, lock_wait_timeout))
|
/* error handling */;
|
ticket= mdl_request.ticket;
|
This should be replaced with:
if (!(ticket= mdl_context.ACQUIRE_LOCK(namespace, db, object, lock_type, lock_wait_timeout)))
|
/* error handling */;
|
This will significantly lower MDL_request exposure and should reduce likelihood of bugs like MDEV-39241. This is a step towards making MDL_request a private class of MDL, such that issues like MDEV-39184 will not pop up again.
Attachments
Issue Links
- relates to
-
MDEV-39184 Rework MDL enum constants values
-
- In Review
-
-
MDEV-39241 THD::backup_commit_lock warning dangling-pointer
-
- Stalled
-