From 773115adcefef7be4ed88f06b5b03d68f7e7b663 Mon Sep 17 00:00:00 2001 From: likui Date: Tue, 11 Jul 2023 11:55:54 +0800 Subject: [PATCH] Remove the idle_timeout option. The option was replaced 4 years ago[1] by connection_recycle_time. The option is not anymore present in sqlalchemy. It's the good time to remove it. [1] https://opendev.org/openstack/oslo.db/commit/6634218415906192fca891362b8fa0ac50b66284 [2] https://review.opendev.org/c/openstack/oslo.db/+/778441 Change-Id: Id288e09688062b007d57f09aebcd7c447e56f04d --- etc/trove/trove.conf.test | 2 +- .../notes/remove-idle-timeout-e4a5db0d5ee524d7.yaml | 5 +++++ trove/common/cfg.py | 6 ++---- 3 files changed, 8 insertions(+), 5 deletions(-) create mode 100644 releasenotes/notes/remove-idle-timeout-e4a5db0d5ee524d7.yaml diff --git a/etc/trove/trove.conf.test b/etc/trove/trove.conf.test index 92f07d7e27..349b7388e0 100644 --- a/etc/trove/trove.conf.test +++ b/etc/trove/trove.conf.test @@ -135,7 +135,7 @@ connection = sqlite:///trove_test.sqlite # idle connections. This can result in 'MySQL Gone Away' exceptions. If you # notice this, you can lower this value to ensure that SQLAlchemy reconnects # before MySQL can drop the connection. -idle_timeout = 3600 +connection_recycle_time = 3600 [composite:trove] use = call:trove.common.wsgi:versioned_urlmap diff --git a/releasenotes/notes/remove-idle-timeout-e4a5db0d5ee524d7.yaml b/releasenotes/notes/remove-idle-timeout-e4a5db0d5ee524d7.yaml new file mode 100644 index 0000000000..6eecb7d4b5 --- /dev/null +++ b/releasenotes/notes/remove-idle-timeout-e4a5db0d5ee524d7.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Removed the ``[database] idle_timeout`` and ``[DEFAULT] idle_timeout`` options. + These were all legacy aliases for ``[database] connection_recycle_time``. diff --git a/trove/common/cfg.py b/trove/common/cfg.py index a717a71c6b..ead42908f0 100644 --- a/trove/common/cfg.py +++ b/trove/common/cfg.py @@ -538,10 +538,8 @@ database_opts = [ secret=True, deprecated_name='sql_connection', deprecated_group='DEFAULT'), - cfg.IntOpt('idle_timeout', - default=3600, - deprecated_name='sql_idle_timeout', - deprecated_group='DEFAULT'), + cfg.IntOpt('connection_recycle_time', + default=3600), cfg.BoolOpt('query_log', default=False, deprecated_name='sql_query_log',