summaryrefslogtreecommitdiff
path: root/oslo_db/options.py
diff options
context:
space:
mode:
authorrossella <rsblendido@suse.com>2014-07-24 17:47:56 +0200
committerRossella Sblendido <rsblendido@suse.com>2015-01-14 09:56:02 +0000
commit1b7c295d522e26aa8bf09242dcc1355c3fb1ab3e (patch)
tree9ae57a08247da8205f36c9991a2dde0cdaa23d39 /oslo_db/options.py
parent67c6f02bb9cff33320a2a92ec3dff41c7ac75337 (diff)
downloadoslo-db-1b7c295d522e26aa8bf09242dcc1355c3fb1ab3e.tar.gz
Retry query if db deadlock error is received
Add a decorator retry_on_deadlock(). All db.api functions marked with this decorator will be retried if a DBDeadlock exception is received. Change-Id: I3488bfec67ec1c563292f1b61a7a9697f118809c Closes-bug: 1348588
Diffstat (limited to 'oslo_db/options.py')
-rw-r--r--oslo_db/options.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/oslo_db/options.py b/oslo_db/options.py
index b855064..9b20dc5 100644
--- a/oslo_db/options.py
+++ b/oslo_db/options.py
@@ -119,18 +119,20 @@ database_opts = [
'on connection lost.'),
cfg.IntOpt('db_retry_interval',
default=1,
- help='Seconds between database connection retries.'),
+ help='Seconds between retries of a database transaction.'),
cfg.BoolOpt('db_inc_retry_interval',
default=True,
- help='If True, increases the interval between database '
- 'connection retries up to db_max_retry_interval.'),
+ help='If True, increases the interval between retries '
+ 'of a database operation up to db_max_retry_interval.'),
cfg.IntOpt('db_max_retry_interval',
default=10,
help='If db_inc_retry_interval is set, the '
- 'maximum seconds between database connection retries.'),
+ 'maximum seconds between retries of a '
+ 'database operation.'),
cfg.IntOpt('db_max_retries',
default=20,
- help='Maximum database connection retries before error is '
+ help='Maximum retries in case of connection error or deadlock '
+ 'error before error is '
'raised. Set to -1 to specify an infinite retry '
'count.'),
]