diff options
author | Eugene Nikanorov <enikanorov@mirantis.com> | 2015-09-28 18:38:21 +0400 |
---|---|---|
committer | Eugene Nikanorov <enikanorov@mirantis.com> | 2015-10-12 14:59:55 +0400 |
commit | 29b626f0ece6f1ab0dec142152fa250b82ce9aec (patch) | |
tree | 41f8d3fe9f5a9509cccd56f979b7e0184bf127a1 /oslo_db | |
parent | 52151aeebd20440b19444db096dcc0332af5141f (diff) | |
download | oslo-db-29b626f0ece6f1ab0dec142152fa250b82ce9aec.tar.gz |
Add debug logging for DB retry attempt.
That should help to debug DB contentions.
Right now it's not clear from the logs if or how often reconnects
are triggered.
Change-Id: I8c9c95c262e69d9aa97294abe7fbfb31b1b18c5d
Diffstat (limited to 'oslo_db')
-rw-r--r-- | oslo_db/api.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/oslo_db/api.py b/oslo_db/api.py index ef840a4..9e2c45d 100644 --- a/oslo_db/api.py +++ b/oslo_db/api.py @@ -29,6 +29,7 @@ import time from oslo_utils import excutils from oslo_utils import importutils +from oslo_utils import reflection import six from oslo_db._i18n import _LE @@ -144,6 +145,8 @@ class wrap_db_retry(object): if isinstance(e, exception.RetryRequest): ectxt.type_ = type(e.inner_exc) ectxt.value = e.inner_exc + LOG.debug("Performing DB retry for function %s", + reflection.get_callable_name(f)) # NOTE(vsergeyev): We are using patched time module, so # this effectively yields the execution # context to another green thread. |