From 9799468d6f31ba8d915c851aae1a66340b5d1d7f Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 15 Feb 2021 16:59:44 +0000 Subject: [PATCH] db: Drop support for experimental concurrency The 'oslo_db.concurrency.TpoolDbapiWrapper' wrapper provides a way to enable the experimental use of thread pooling for all DB API calls. This has been part of 'oslo.db' since that project was first split out on nova back in change I0649539e071b2318ec85ed5d70259c949408e64b and has been part of nova for even longer, having been first introduced in change Id7de85dce11f5ea61dfccddf80de7800a2bc4e37. However, this has not graduated to non-experimental status in the 7 years since and is unlikely to so now. It also isn't used for any of the API DB calls. Hasta la vista, 'TpoolDbapiWrapper'. You've had a good ride. Change-Id: I1ce8f180d6bef465f9faa0a10c837841ed7ab528 Signed-off-by: Stephen Finucane --- etc/nova/nova-config-generator.conf | 1 - nova/db/api.py | 8 ++++---- .../notes/drop-oslo_db-use_tpool-48542a28d10e1bae.yaml | 8 ++++++++ 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 releasenotes/notes/drop-oslo_db-use_tpool-48542a28d10e1bae.yaml diff --git a/etc/nova/nova-config-generator.conf b/etc/nova/nova-config-generator.conf index ad2be60913..50a2f75c46 100644 --- a/etc/nova/nova-config-generator.conf +++ b/etc/nova/nova-config-generator.conf @@ -10,7 +10,6 @@ namespace = oslo.privsep namespace = oslo.service.periodic_task namespace = oslo.service.service namespace = oslo.db -namespace = oslo.db.concurrency namespace = oslo.middleware namespace = oslo.concurrency namespace = keystonemiddleware.auth_token diff --git a/nova/db/api.py b/nova/db/api.py index 8c5281d8a6..35ddc64758 100644 --- a/nova/db/api.py +++ b/nova/db/api.py @@ -27,17 +27,17 @@ these objects be simple dictionaries. """ -from oslo_db import concurrency +from oslo_db import api from oslo_log import log as logging import nova.conf - CONF = nova.conf.CONF LOG = logging.getLogger(__name__) -_BACKEND_MAPPING = {'sqlalchemy': 'nova.db.sqlalchemy.api'} -IMPL = concurrency.TpoolDbapiWrapper(CONF, backend_mapping=_BACKEND_MAPPING) +IMPL = api.DBAPI.from_config( + conf=CONF, backend_mapping={'sqlalchemy': 'nova.db.sqlalchemy.api'}, +) ################### diff --git a/releasenotes/notes/drop-oslo_db-use_tpool-48542a28d10e1bae.yaml b/releasenotes/notes/drop-oslo_db-use_tpool-48542a28d10e1bae.yaml new file mode 100644 index 0000000000..9dee372f15 --- /dev/null +++ b/releasenotes/notes/drop-oslo_db-use_tpool-48542a28d10e1bae.yaml @@ -0,0 +1,8 @@ +--- +upgrade: + - | + Experimental support for thread pooling of DB API calls has been removed. + This feature was first introduced in the 2014.2 (Juno) release but has not + graduated to fully-supported status since nor was it being used for any + API DB calls. The ``[oslo_db] use_tpool`` config option used to enable + this feature will now be ignored by nova.