]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Retry on database deadlock on service_update method
authorIvan Kolodyazhny <e0ne@e0ne.info>
Fri, 13 Nov 2015 18:56:55 +0000 (20:56 +0200)
committerIvan Kolodyazhny <e0ne@e0ne.info>
Fri, 13 Nov 2015 18:56:55 +0000 (20:56 +0200)
service_update could fail with deadlock in some active-active
deployments. Added _retry_on_deadlock decorator to fix this issue.

Change-Id: Icfedb5ec0042e1d588314d56856f9ebab537665e
Closes-Bug: #1516124

cinder/db/sqlalchemy/api.py

index b3869e0aef2dae8a4b0fad1ab4707bbb4ad1d601..f3e26eb7f98f5b21690d7fe7457ea200713d639b 100644 (file)
@@ -436,6 +436,7 @@ def service_create(context, values):
 
 
 @require_admin_context
+@_retry_on_deadlock
 def service_update(context, service_id, values):
     session = get_session()
     with session.begin():