]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commit
Remove SELECT FOR UPDATE use in ML2 type driver release_segment
authorCedric Brandily <zzelle@gmail.com>
Mon, 16 Jun 2014 20:56:10 +0000 (22:56 +0200)
committerCedric Brandily <zzelle@gmail.com>
Tue, 17 Jun 2014 23:15:56 +0000 (23:15 +0000)
commitdca3a8eafc5530794a0cc65c086af1db54028012
treeda8f30efa6a7a0d8015c4ed62b7b8fb54fa8b13d
parent740abdfe00001e16346211c2589b413c962fb121
Remove SELECT FOR UPDATE use in ML2 type driver release_segment

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 release_segment methods
with the use of single-shot UPDATE and DELETE expressions, and this
patch clears a number of uses of SELECT FOR UPDATE by consolidating
multiple SQL expressions into one.

Partial-Bug: #1330562
Change-Id: I29ffcafc8d4d73ac1cb50c94df5da85514d47a3f
neutron/plugins/ml2/drivers/type_flat.py
neutron/plugins/ml2/drivers/type_gre.py
neutron/plugins/ml2/drivers/type_vlan.py
neutron/plugins/ml2/drivers/type_vxlan.py