Merge "Fix allocate_and_associate DB deadlock"

This commit is contained in:
Zuul 2019-06-15 02:08:29 +00:00 committed by Gerrit Code Review
commit acf551c0bd
2 changed files with 5 additions and 0 deletions

View File

@ -1137,6 +1137,7 @@ class AmphoraRepository(BaseRepository):
id=amphora_id).first()
load_balancer.amphorae.append(amphora)
@oslo_db_api.wrap_db_retry(max_retries=5, retry_on_deadlock=True)
def allocate_and_associate(self, session, load_balancer_id):
"""Allocate an amphora for a load balancer.

View File

@ -0,0 +1,4 @@
---
fixes:
- |
Fixes a potential DB deadlock in allocate_and_associate found in testing.