summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oslo_db/options.py4
-rw-r--r--oslo_db/sqlalchemy/enginefacade.py1
-rw-r--r--oslo_db/tests/sqlalchemy/test_sqlalchemy.py1
-rw-r--r--releasenotes/notes/wrap_db_retry-34c7ff2d82afa3f5.yaml6
4 files changed, 12 insertions, 0 deletions
diff --git a/oslo_db/options.py b/oslo_db/options.py
index a02dad5..d5d15cf 100644
--- a/oslo_db/options.py
+++ b/oslo_db/options.py
@@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+from debtcollector import removals
from oslo_config import cfg
@@ -142,6 +143,9 @@ database_opts = [
]
+@removals.removed_kwarg("sqlite_db",
+ "Config option sqlite_db is deprecated for removal,"
+ "please use option `connection`.")
def set_defaults(conf, connection=None, sqlite_db=None,
max_pool_size=None, max_overflow=None,
pool_timeout=None):
diff --git a/oslo_db/sqlalchemy/enginefacade.py b/oslo_db/sqlalchemy/enginefacade.py
index 9929304..8150875 100644
--- a/oslo_db/sqlalchemy/enginefacade.py
+++ b/oslo_db/sqlalchemy/enginefacade.py
@@ -145,6 +145,7 @@ class _TransactionFactory(object):
'thread_checkin': _Default(True),
'json_serializer': _Default(None),
'json_deserializer': _Default(None),
+ 'logging_name': _Default(None)
}
self._maker_cfg = {
'expire_on_commit': _Default(False),
diff --git a/oslo_db/tests/sqlalchemy/test_sqlalchemy.py b/oslo_db/tests/sqlalchemy/test_sqlalchemy.py
index 6f327d6..19cfe99 100644
--- a/oslo_db/tests/sqlalchemy/test_sqlalchemy.py
+++ b/oslo_db/tests/sqlalchemy/test_sqlalchemy.py
@@ -351,6 +351,7 @@ class EngineFacadeTestCase(oslo_test.BaseTestCase):
thread_checkin=mock.ANY,
json_serializer=None,
json_deserializer=None,
+ logging_name=mock.ANY,
)
get_maker.assert_called_once_with(engine=create_engine(),
autocommit=False,
diff --git a/releasenotes/notes/wrap_db_retry-34c7ff2d82afa3f5.yaml b/releasenotes/notes/wrap_db_retry-34c7ff2d82afa3f5.yaml
new file mode 100644
index 0000000..1e3b434
--- /dev/null
+++ b/releasenotes/notes/wrap_db_retry-34c7ff2d82afa3f5.yaml
@@ -0,0 +1,6 @@
+---
+fixes:
+ - Decorator ``oslo_db.api.wrap_db_retry`` now defaults to 10 retries.
+ Previously the number of attempts was 0, and users had to explicitly
+ pass ``max_retry_interval`` value greater than 0 to actually enable
+ retries on errors.