1 --- neutron.orig/neutron/db/api.py 2016-08-18 17:21:13.507395437 +0200
2 +++ neutron/neutron/db/api.py 2016-08-18 17:22:04.214899405 +0200
4 from oslo_db import api as oslo_db_api
5 from oslo_db import exception as db_exc
6 from oslo_db.sqlalchemy import enginefacade
7 -from oslo_log import log as logging
8 from oslo_utils import excutils
9 import osprofiler.sqlalchemy
12 from sqlalchemy.orm import exc
15 from neutron.common import exceptions
16 from neutron.common import profiler # noqa
21 -LOG = logging.getLogger(__name__)
26 is_deadlock = moves.moved_function(is_retriable, 'is_deadlock', __name__,
27 message='use "is_retriable" instead',
28 version='newton', removal_version='ocata')
29 -_retry_db_errors = oslo_db_api.wrap_db_retry(
30 +retry_db_errors = oslo_db_api.wrap_db_retry(
31 max_retries=MAX_RETRIES,
33 inc_retry_interval=True,
38 -def retry_db_errors(f):
39 - """Log retriable exceptions before retry to help debugging."""
43 - def wrapped(*args, **kwargs):
45 - return f(*args, **kwargs)
46 - except Exception as e:
47 - with excutils.save_and_reraise_exception():
49 - LOG.debug("Retry wrapper got retriable exception: %s",
50 - traceback.format_exc())
54 def reraise_as_retryrequest(f):
55 """Packs retriable exceptions into a RetryRequest."""