diff options
author | Erik Olof Gunnar Andersson <eandersson@blizzard.com> | 2019-04-06 11:59:42 -0700 |
---|---|---|
committer | Erik Olof Gunnar Andersson <eandersson@blizzard.com> | 2019-04-06 12:54:28 -0700 |
commit | 6cfdc11ea1ed7d8873f91683d6ea1be95fdff89e (patch) | |
tree | 509608ebf22413e80ebbd939afcd2f28c06ff626 /oslo_db | |
parent | 57333e902a3747715b2f13ea63477cc4aedc2129 (diff) | |
download | oslo-db-6cfdc11ea1ed7d8873f91683d6ea1be95fdff89e.tar.gz |
Removing deprecated min_pool_size
The database option min_pool_size is not actually
used in oslo.db.
This is a folllow up to
Ib07b7b4200b5cf3a34b8eed441e6754da7d446cf
Change-Id: I89754e9e4b42c45259729b0b0bb0a4bf464a981c
Diffstat (limited to 'oslo_db')
-rw-r--r-- | oslo_db/options.py | 11 | ||||
-rw-r--r-- | oslo_db/sqlalchemy/enginefacade.py | 2 | ||||
-rw-r--r-- | oslo_db/tests/sqlalchemy/test_options.py | 6 |
3 files changed, 1 insertions, 18 deletions
diff --git a/oslo_db/options.py b/oslo_db/options.py index 58b4efd..ef13146 100644 --- a/oslo_db/options.py +++ b/oslo_db/options.py @@ -67,17 +67,6 @@ database_opts = [ 'pool longer than this number of seconds will be replaced ' 'with a new one the next time they are checked out from ' 'the pool.'), - cfg.IntOpt('min_pool_size', - default=1, - deprecated_opts=[cfg.DeprecatedOpt('sql_min_pool_size', - group='DEFAULT'), - cfg.DeprecatedOpt('sql_min_pool_size', - group='DATABASE')], - deprecated_for_removal=True, - deprecated_reason='The option to set the minimum pool ' - 'size is not supported by sqlalchemy.', - help='Minimum number of SQL connections to keep open in a ' - 'pool.'), cfg.IntOpt('max_pool_size', default=5, deprecated_opts=[cfg.DeprecatedOpt('sql_max_pool_size', diff --git a/oslo_db/sqlalchemy/enginefacade.py b/oslo_db/sqlalchemy/enginefacade.py index 1cfff15..39fd25d 100644 --- a/oslo_db/sqlalchemy/enginefacade.py +++ b/oslo_db/sqlalchemy/enginefacade.py @@ -181,7 +181,7 @@ class _TransactionFactory(object): (k, _Default(None)) for k in [ 'db_max_retries', 'db_inc_retry_interval', 'use_db_reconnect', - 'db_retry_interval', 'min_pool_size', + 'db_retry_interval', 'db_max_retry_interval', 'backend', 'use_tpool']) self._started = False diff --git a/oslo_db/tests/sqlalchemy/test_options.py b/oslo_db/tests/sqlalchemy/test_options.py index 45a29b1..4984254 100644 --- a/oslo_db/tests/sqlalchemy/test_options.py +++ b/oslo_db/tests/sqlalchemy/test_options.py @@ -30,7 +30,6 @@ class DbApiOptionsTestCase(test_utils.BaseTestCase): def test_deprecated_session_parameters(self): path = self.create_tempfiles([["tmp", b"""[DEFAULT] sql_connection=x://y.z -sql_min_pool_size=10 sql_max_pool_size=20 sql_max_retries=30 sql_retry_interval=40 @@ -40,7 +39,6 @@ sql_connection_trace=True """]])[0] self.conf(['--config-file', path]) self.assertEqual('x://y.z', self.conf.database.connection) - self.assertEqual(10, self.conf.database.min_pool_size) self.assertEqual(20, self.conf.database.max_pool_size) self.assertEqual(30, self.conf.database.max_retries) self.assertEqual(40, self.conf.database.retry_interval) @@ -51,7 +49,6 @@ sql_connection_trace=True def test_session_parameters(self): path = self.create_tempfiles([["tmp", b"""[database] connection=x://y.z -min_pool_size=10 max_pool_size=20 max_retries=30 retry_interval=40 @@ -62,7 +59,6 @@ pool_timeout=7 """]])[0] self.conf(['--config-file', path]) self.assertEqual('x://y.z', self.conf.database.connection) - self.assertEqual(10, self.conf.database.min_pool_size) self.assertEqual(20, self.conf.database.max_pool_size) self.assertEqual(30, self.conf.database.max_retries) self.assertEqual(40, self.conf.database.retry_interval) @@ -75,7 +71,6 @@ pool_timeout=7 path = self.create_tempfiles([['tmp', b'[DATABASE]\n' b'sql_connection=fake_connection\n' b'sql_idle_timeout=100\n' - b'sql_min_pool_size=99\n' b'sql_max_pool_size=199\n' b'sql_max_retries=22\n' b'reconnect_interval=17\n' @@ -86,7 +81,6 @@ pool_timeout=7 self.assertEqual('fake_connection', self.conf.database.connection) self.assertEqual(100, self.conf.database.connection_recycle_time) self.assertEqual(100, self.conf.database.idle_timeout) - self.assertEqual(99, self.conf.database.min_pool_size) self.assertEqual(199, self.conf.database.max_pool_size) self.assertEqual(22, self.conf.database.max_retries) self.assertEqual(17, self.conf.database.retry_interval) |