]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Add retry_on_deadlock to db update methods
authorJohn Griffith <john.griffith8@gmail.com>
Fri, 1 Aug 2014 23:10:55 +0000 (17:10 -0600)
committerJohn Griffith <john.griffith8@gmail.com>
Tue, 5 Aug 2014 17:28:32 +0000 (11:28 -0600)
commit201adf31a57ea4d456ef5daf1eca2ed3b64fca85
treec382999b7d850d47266cf2bd58c353bbd9ecbf99
parentb776fa41950b332269ddc46a8e24f3037280ac7b
Add retry_on_deadlock to db update methods

There's some known races that have been addressed in
Nova via a retry_on_deadlock deocrator.  Some known
cases in Cinder exist as well when dealing with updates
to quotas and reservations_expire.

This patch introduces the decorator to Cinder and hits
the methods known to be susceptible to deadlock as well
as some others that seem as though they'd fall into the
same category.

Leverages work that's already been done in Nova

Co-Authored-By: Vish Ishaya <vishvananda@gmail.com>
Change-Id: Ic807f4f8a333e4d5477f86e41eea40191637087c
Partial-bug: #1350466
cinder/db/sqlalchemy/api.py