[Django] #29380: Support skip_locked argument to QuerySet.select_for_update() on MYSQL 8+

23 views
Skip to first unread message

Django

unread,
May 4, 2018, 7:03:04 AM5/4/18
to django-...@googlegroups.com
#29380: Support skip_locked argument to QuerySet.select_for_update() on MYSQL 8+
-------------------------------------+-------------------------------------
Reporter: bakabiko | Owner: nobody
Type: New | Status: new
feature |
Component: Database | Version: master
layer (models, ORM) | Keywords: skip_locked, MYSQL,
Severity: Normal | database
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
-------------------------------------+-------------------------------------
MYSQL 8+ already supports skip locked and no wait options while Django DB
backend doesn't support it for MYSQL.

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

--
Ticket URL: <https://code.djangoproject.com/ticket/29380>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 4, 2018, 8:24:10 AM5/4/18
to django-...@googlegroups.com
#29380: Add support for QuerySet.select_for_update()'s nowait and skip_locked
options on MySQL 8+

-------------------------------------+-------------------------------------
Reporter: bakabiko | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: skip_locked, MYSQL, | Triage Stage: Accepted
database |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Accepted
* type: New feature => Cleanup/optimization
* easy: 1 => 0


Old description:

> MYSQL 8+ already supports skip locked and no wait options while Django DB
> backend doesn't support it for MYSQL.
>
> Reference: https://mysqlserverteam.com/mysql-8-0-1-using-skip-locked-and-
> nowait-to-handle-hot-rows/

New description:

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/

--

--
Ticket URL: <https://code.djangoproject.com/ticket/29380#comment:1>

Django

unread,
May 4, 2018, 9:08:15 AM5/4/18
to django-...@googlegroups.com
#29380: Add support for QuerySet.select_for_update()'s nowait and skip_locked
options on MySQL 8+
-------------------------------------+-------------------------------------
Reporter: bakabiko | Owner: Nicolas
Type: | Noé
Cleanup/optimization | Status: assigned

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: skip_locked, MYSQL, | Triage Stage: Accepted
database |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Nicolas Noé):

* status: new => assigned
* owner: nobody => Nicolas Noé


--
Ticket URL: <https://code.djangoproject.com/ticket/29380#comment:2>

Django

unread,
May 4, 2018, 10:44:34 AM5/4/18
to django-...@googlegroups.com
#29380: Add support for QuerySet.select_for_update()'s nowait and skip_locked
options on MySQL 8+
-------------------------------------+-------------------------------------

Reporter: bakabiko | Owner: Nicolas
Type: | Noé
Cleanup/optimization | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: skip_locked, MYSQL, | Triage Stage: Accepted
database |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by bakabiko):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/29380#comment:3>

Django

unread,
May 7, 2018, 11:12:37 AM5/7/18
to django-...@googlegroups.com
#29380: Add support for QuerySet.select_for_update()'s nowait and skip_locked
options on MySQL 8+
-------------------------------------+-------------------------------------

Reporter: bakabiko | Owner: Nicolas
Type: | Noé
Cleanup/optimization | Status: assigned
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: skip_locked, MYSQL, | Triage Stage: Accepted
database |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Adam (Chainz) Johnson):

* cc: Adam (Chainz) Johnson (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/29380#comment:4>

Django

unread,
May 8, 2018, 3:27:34 AM5/8/18
to django-...@googlegroups.com
#29380: Add support for QuerySet.select_for_update()'s nowait and skip_locked
options on MySQL 8+
-------------------------------------+-------------------------------------
Reporter: bakabiko | Owner: (none)
Type: | Status: new
Cleanup/optimization |

Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: skip_locked, MYSQL, | Triage Stage: Accepted
database |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Nicolas Noé):

* owner: Nicolas Noé => (none)
* status: assigned => new


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/29380#comment:5>

Django

unread,
May 8, 2018, 3:37:43 PM5/8/18
to django-...@googlegroups.com
#29380: Add support for QuerySet.select_for_update()'s nowait and skip_locked
options on MySQL 8+
-------------------------------------+-------------------------------------
Reporter: bakabiko | Owner: bakabiko
Type: | Status: assigned

Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: skip_locked, MYSQL, | Triage Stage: Accepted
database |
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by bakabiko):

* owner: (none) => bakabiko


* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/29380#comment:6>

Django

unread,
May 8, 2018, 8:20:56 PM5/8/18
to django-...@googlegroups.com
#29380: Add support for QuerySet.select_for_update()'s nowait and skip_locked
options on MySQL 8+
-------------------------------------+-------------------------------------

Reporter: bakabiko | Owner: bakabiko
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: skip_locked, MYSQL, | Triage Stage: Accepted
database |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by bakabiko):

* has_patch: 0 => 1


Comment:

https://github.com/django/django/pull/9934

--
Ticket URL: <https://code.djangoproject.com/ticket/29380#comment:7>

Django

unread,
May 8, 2018, 9:21:45 PM5/8/18
to django-...@googlegroups.com
#29380: Add support for QuerySet.select_for_update()'s nowait and skip_locked
options on MySQL 8+
-------------------------------------+-------------------------------------

Reporter: bakabiko | Owner: bakabiko
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: skip_locked, MYSQL, | Triage Stage: Accepted
database |
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* needs_better_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/29380#comment:8>

Django

unread,
May 18, 2018, 10:58:26 AM5/18/18
to django-...@googlegroups.com
#29380: Add support for QuerySet.select_for_update()'s nowait and skip_locked
options on MySQL 8+
-------------------------------------+-------------------------------------

Reporter: bakabiko | Owner: bakabiko
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: skip_locked, MYSQL, | Triage Stage: Accepted
database |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by bakabiko):

* needs_better_patch: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/29380#comment:9>

Django

unread,
May 18, 2018, 11:03:02 AM5/18/18
to django-...@googlegroups.com
#29380: Add support for QuerySet.select_for_update()'s nowait and skip_locked
options on MySQL 8+
-------------------------------------+-------------------------------------

Reporter: bakabiko | Owner: bakabiko
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: skip_locked, MYSQL, | Triage Stage: Accepted
database |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by bakabiko):

the pull request is updated.

--
Ticket URL: <https://code.djangoproject.com/ticket/29380#comment:10>

Django

unread,
May 18, 2018, 7:37:55 PM5/18/18
to django-...@googlegroups.com
#29380: Add support for QuerySet.select_for_update()'s nowait and skip_locked
options on MySQL 8+
-------------------------------------+-------------------------------------
Reporter: bakabiko | Owner: bakabiko
Type: | Status: closed

Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed

Keywords: skip_locked, MYSQL, | Triage Stage: Accepted
database |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"a7bc1aea03508f544c9dfac0f34b01996653cef4" a7bc1aea]:
{{{
#!CommitTicketReference repository=""
revision="a7bc1aea03508f544c9dfac0f34b01996653cef4"
Fixed #29380 -- Added support for QuerySet.select_for_update()'s nowait
and skip_locked options on MySQL 8+.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29380#comment:11>

Django

unread,
May 18, 2018, 7:38:59 PM5/18/18
to django-...@googlegroups.com
#29380: Add support for QuerySet.select_for_update()'s nowait and skip_locked
options on MySQL 8+
-------------------------------------+-------------------------------------

Reporter: bakabiko | Owner: bakabiko
Type: | Status: closed
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: skip_locked, MYSQL, | Triage Stage: Accepted
database |
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"54b29e022d14c2fee34c01a41f016d531bef5057" 54b29e0]:
{{{
#!CommitTicketReference repository=""
revision="54b29e022d14c2fee34c01a41f016d531bef5057"
[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
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29380#comment:12>

Reply all
Reply to author
Forward
0 new messages