summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-03-30 08:40:07 +0000
committerGerrit Code Review <review@openstack.org>2015-03-30 08:40:07 +0000
commita7760741556559554536db84f2b49cac00f076bb (patch)
tree8ef7e8cf28d0814c53d6d1a406d2366c2f7b6876
parent3cf218d0961cf1e0dc2c6f58602c307f43ac6ad9 (diff)
parent02aeda28cf8b69f39f934a3e80cb7cae04c5fc20 (diff)
downloadoslo-db-a7760741556559554536db84f2b49cac00f076bb.tar.gz
Merge "Avoid excessing logging of RetryRequest exception"
-rw-r--r--oslo_db/api.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/oslo_db/api.py b/oslo_db/api.py
index 616cac5..0ba07e8 100644
--- a/oslo_db/api.py
+++ b/oslo_db/api.py
@@ -139,7 +139,11 @@ class wrap_db_retry(object):
raise e
if remaining != -1:
remaining -= 1
- LOG.exception(_LE('DB error.'))
+ # RetryRequest is application-initated exception
+ # and not an error condition in case retries are
+ # not exceeded
+ if not isinstance(e, exception.RetryRequest):
+ LOG.exception(_LE('DB error.'))
# NOTE(vsergeyev): We are using patched time module, so
# this effectively yields the execution
# context to another green thread.