Opened 5 months ago

Closed 5 months ago

Last modified 5 months ago

#29380 closed Cleanup/optimization (fixed)

Add support for QuerySet.select_for_update()'s nowait and skip_locked options on MySQL 8+

Reported by: bakabiko Owned by: bakabiko
Component: Database layer (models, ORM) Version: master
Severity: Normal Keywords: skip_locked, MYSQL, database
Cc: Adam (Chainz) Johnson Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

MySQL 8+ supports skip_locked and nowait options but the MySQL database backend doesn't support them.

Reference: https://mysqlserverteam.com/mysql-8-0-1-using-skip-locked-and-nowait-to-handle-hot-rows/

Change History (12)

comment:1 Changed 5 months ago by Tim Graham

Description: modified (diff)
Easy pickings: unset
Summary: Support skip_locked argument to QuerySet.select_for_update() on MYSQL 8+Add support for QuerySet.select_for_update()'s nowait and skip_locked options on MySQL 8+
Triage Stage: UnreviewedAccepted
Type: New featureCleanup/optimization

comment:2 Changed 5 months ago by Nicolas Noé

Owner: changed from nobody to Nicolas Noé
Status: newassigned

comment:3 Changed 5 months ago by bakabiko

I already have a patch, you can assign the ticket to me.

comment:4 Changed 5 months ago by Adam (Chainz) Johnson

Cc: Adam (Chainz) Johnson added

comment:5 Changed 5 months ago by Nicolas Noé

Owner: Nicolas Noé deleted
Status: assignednew

Deassigned so bakabiko can take it if he/she wants!

comment:6 Changed 5 months ago by bakabiko

Owner: set to bakabiko
Status: newassigned

comment:8 Changed 5 months ago by Tim Graham

Patch needs improvement: set

comment:9 Changed 5 months ago by bakabiko

Patch needs improvement: unset

comment:10 Changed 5 months ago by bakabiko

the pull request is updated.

comment:11 Changed 5 months ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In a7bc1aea:

Fixed #29380 -- Added support for QuerySet.select_for_update()'s nowait and skip_locked options on MySQL 8+.

comment:12 Changed 5 months ago by Tim Graham <timograham@…>

In 54b29e0:

[2.1.x] Fixed #29380 -- Added support for QuerySet.select_for_update()'s nowait and skip_locked options on MySQL 8+.

Backport of a7bc1aea03508f544c9dfac0f34b01996653cef4 from master

Note: See TracTickets for help on using tickets.
Back to Top