Avoid excessing logging of RetryRequest exception
Such exception indicates of error condition only if retries are exceeded. In other cases error-level logs pollute the log file and complicate log analysis. Change-Id: I318867043a68a6499851631593859a0fffac6038 Closes-Bug: #1433001
This commit is contained in:
parent
de9439c457
commit
02aeda28cf
@ -139,7 +139,11 @@ class wrap_db_retry(object):
|
|||||||
raise e
|
raise e
|
||||||
if remaining != -1:
|
if remaining != -1:
|
||||||
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
|
# NOTE(vsergeyev): We are using patched time module, so
|
||||||
# this effectively yields the execution
|
# this effectively yields the execution
|
||||||
# context to another green thread.
|
# context to another green thread.
|
||||||
|
Loading…
Reference in New Issue
Block a user