summaryrefslogtreecommitdiff
path: root/oslo_db/concurrency.py
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2021-06-25 13:54:11 +0100
committerStephen Finucane <stephenfin@redhat.com>2021-06-25 16:14:21 +0100
commit74c6bf266e0b86ceb4726cad9268f134d423bae8 (patch)
tree3eadcb667bd5e1b7e328a821631bdd0fdfd613b4 /oslo_db/concurrency.py
parenta778f2d87fac95868274d6396c27df40ca006bef (diff)
downloadoslo-db-74c6bf266e0b86ceb4726cad9268f134d423bae8.tar.gz
concurrency: Deprecate 'TpoolDbapiWrapper'
This has been marked as experimented since before oslo.db was split out of nova. We've no test coverage and no idea of whether it even works nowadays. It's time to plan for its eventual removal. Change-Id: Ib7a5a6e1124c44a742b003442f815022a866bcbb Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Diffstat (limited to 'oslo_db/concurrency.py')
-rw-r--r--oslo_db/concurrency.py31
1 files changed, 24 insertions, 7 deletions
diff --git a/oslo_db/concurrency.py b/oslo_db/concurrency.py
index 87c7a86..6043a68 100644
--- a/oslo_db/concurrency.py
+++ b/oslo_db/concurrency.py
@@ -17,23 +17,40 @@ import copy
import logging
import threading
+from debtcollector import removals
from oslo_config import cfg
from oslo_db import api
-
LOG = logging.getLogger(__name__)
tpool_opts = [
- cfg.BoolOpt('use_tpool',
- default=False,
- deprecated_name='dbapi_use_tpool',
- deprecated_group='DEFAULT',
- help='Enable the experimental use of thread pooling for '
- 'all DB API calls'),
+ cfg.BoolOpt(
+ 'use_tpool',
+ default=False,
+ deprecated_name='dbapi_use_tpool',
+ deprecated_group='DEFAULT',
+ deprecated_for_removal=True,
+ deprecated_since='10.0.0',
+ deprecated_reason=(
+ 'This feature has never graduated from experimental status and is '
+ 'now being removed due to lack of maintenance and test coverage'
+ ),
+ help=(
+ 'Enable the experimental use of thread pooling for '
+ 'all DB API calls'
+ ),
+ ),
]
+_removed_msg = (
+ 'Thread pool support in oslo_db is deprecated; you should use '
+ 'oslo_db.api.DBAPI.from_config directly'
+)
+
+@removals.removed_class(
+ 'TpoolDbapiWrapper', message=_removed_msg, version='10.0.0')
class TpoolDbapiWrapper(object):
"""DB API wrapper class.