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
This commit is contained in:
Eugene Nikanorov 2015-09-28 18:38:21 +04:00
parent 52151aeebd
commit 29b626f0ec
1 changed files with 3 additions and 0 deletions

View File

@ -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.