Browse Source

Retry on DB deadlock in event_create()

Change-Id: I50c106a2b80a707ba8296efed86194526d6e5da6
Task: 30196
changes/44/648244/1
Zane Bitter 3 years ago
parent
commit
41b9a650df
  1. 2
      heat/db/sqlalchemy/api.py

2
heat/db/sqlalchemy/api.py

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

Loading…
Cancel
Save