Remove SELECT FOR UPDATE usage

Bug #1364358 reported by Cedric Brandily
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Undecided
Unassigned

Bug Description

MySQL Galera does not support SELECT ... FOR UPDATE[1], since it has no concept of cross-node locking of records and results are non-deterministic.

Moreover SELECT FOR UPDATE could be deadlock and slowness sources.

Remove the use of SELECT FOR UPDATE in (neutron.db.firewall.)firewall_db module

[1]http://lists.openstack.org/pipermail/openstack-dev/2014-May/035264.html

Tags: db Edit Tag help
Changed in neutron:
assignee: nobody → Cedric Brandily (cbrandily)
Changed in neutron:
status: New → In Progress
Revision history for this message
Cedric Brandily (cbrandily) wrote :

==> remove SELECT FOR UPDATE use in update_firewall https://review.openstack.org/117022
==> remove SELECT FOR UPDATE use in delete_firewall https://review.openstack.org/116988

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/116988
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=187217d767ca41b742937fe183ba4a4c20e59185
Submitter: Jenkins
Branch: master

commit 187217d767ca41b742937fe183ba4a4c20e59185
Author: Cedric Brandily <email address hidden>
Date: Tue Aug 26 20:23:04 2014 +0200

    Remove SELECT FOR UPDATE use in delete_firewall

    SELECT FOR UPDATE expression, which is triggered with the use of the
    SQLAlchemy Query object's with_lockmode('update') method, is
    detrimental to performance and scalability of the database
    performance code in Neutron due to the lock contention it produces.

    SELECT FOR UPDATE can be entirely avoided in delete_firewall method
    with the use of single-shot DELETE expressions.

    Partial-Bug: #1364358
    Change-Id: Ia8db73312f5dff6a5bd573694a60a798279834cb

Revision history for this message
Cedric Brandily (cbrandily) wrote :

This bug is > 365 days without activity. We are unsetting assignee and milestone and setting status to Incomplete in order to allow its expiry in 60 days.

If the bug is still valid, then update the bug status.

Changed in neutron:
assignee: Cedric Brandily (cbrandily) → nobody
status: In Progress → Incomplete
Revision history for this message
Cedric Brandily (cbrandily) wrote :

My feedback: the current design disallows to remove all SELECT FOR UPDATE so the right bug would to ensure all SELECT FOR UPDATE are Galera multi-writers compliant

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for neutron because there has been no activity for 60 days.]

Changed in neutron:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers