Browse Source

Merge "Retry on DB deadlock in event_create()" into stable/queens

changes/99/673199/1
Zuul 1 month ago
parent
commit
3735796c20
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      heat/db/sqlalchemy/api.py

+ 2
- 0
heat/db/sqlalchemy/api.py View File

@@ -1056,6 +1056,8 @@ def _delete_event_rows(context, stack_id, limit):
1056 1056
     return retval
1057 1057
 
1058 1058
 
1059
+@oslo_db_api.wrap_db_retry(max_retries=3, retry_on_deadlock=True,
1060
+                           retry_interval=0.5, inc_retry_interval=True)
1059 1061
 def event_create(context, values):
1060 1062
     if 'stack_id' in values and cfg.CONF.max_events_per_stack:
1061 1063
         # only count events and purge on average

Loading…
Cancel
Save