| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This option has for a long time done nothing in oslo.db
and sqlalchemy does not support this convention. As such I
recommend that we deprecate and eventually remove the option.
Closes-bug: #1764786
Change-Id: Ib07b7b4200b5cf3a34b8eed441e6754da7d446cf
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The @oslo_db.api.wrap_db_retry is used for db.api methods
retrying. If db_error raised, the decorator help us to call
the api methods again after a few seconds(accurately, is
2**retry_times seconds).
If the db_error is deadlock error, the old wrap_db_retry
is not so suitable anymore. As we know, some deadlocks cause
because we call some methods(transactions) concurrently. If
we only retry after stable 2**retry_times seconds, we will
recall the method concurrently again.
In order to minimize the chance of regenerating a deadlock
and reduce the average sleep time, we propose to add some
random jitter to the delay period by default when the
deadlock error is detected.
Change-Id: I206745708570f1f292529ff58eee9b83fc09a9f2
Closes-bug: #1737869
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The sheer act of registering the 'use_tpool' option seems to be enough
to cause the following warning:
NotSupportedWarning: Configuration option(s) ['use_tpool'] not
supported
Add it to the list of ignored opts, thus silencing this warning.
Change-Id: I4a5f8958c3e0fc68fa3a4ae979f284c4fbd9b82b
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Downstream projects have started using the fixtures inside
of oslo_db.tests in response to the deprecations added in
I0163e637ffef6d45d2573ebe29b5438911d01fce. This was not
the intent of these deprecations, so add messsaging to
this effect and ensure fixtures used by the test suite
itself are noted as private.
Change-Id: I3afe0a440a3ab66904aaecf556948df9d4e16b8e
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
Change-Id: I8e745e279e295b1b9a42b661d4da2568ce981e7a
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
MariaDB 10.2 appears to not return server defaults with quotes
around integer values which breaks the assumption that we have
to de-quote server default values. Make the dequoting
a regexp that will pass when the quotes are not present.
Change-Id: Ie5aeffcc3c550673a7fdd82769a315821cebb272
Closes-bug: #1750414
|
|\ \ \ \
| |/ / /
|/| | | |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The Nova project has made the decision to store the entire
contents of the "sql_connection" field in the database, with
alterations to the host value, such that various "cells" database
URLs can be located using Nova's database itself as a central
registry of database URLs.
This architecture has produced several problems. The first
is that it is impossible to apply parameters to the URL that
are local to the client machine; the leading example of this
is the MySQL "bind_host" variable, which must match the hostname
of the connecting host. Because cells puts these URLs into the
database and shares them with all controllers, we have to use a workaround
with the read_default_file parameter to specify a controller-local
file of options; this is not a standard thing
for other database drivers, and these parameters only apply to
the MySQL driver and not the SQLAlchemy engine.
The next issue is that it is inconvenient to add parameters
to the URL at all, once Nova has already been running, as one
must manually use Nova's command line tools
to alter all the URLs that have already been copied into the database
and alter the query parameters with each of those individually,
and then restart *all* services who will all receive the parameter
(no way to add params to just one controller).
Nova's "store the URL in the database" feature only needs to be able
to locate the host / database name of the alternate database,
and not change the URL tuning parameters. This patch adds a new
oslo.db parameter connection_parameters which allows the params to
be applied separately from the sql_connection parameter, so that
Nova can continue persisting sql_connection but the parameters remain
local to the nova.conf file. A URL parameter that truly had to remain
persisted in Nova's database (there aren't any) could still be applied
at the sql_connection level.
This feature is essential not just so that we can again place
simple parameters into controller-local files like "bind_host", but
also to allow for configuration of SQLAlchemy features such as
plugins that do connection pool monitoring.
Change-Id: Id4de4b09ec4719cbf8b372629fcf58cf368a33d4
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Repaired the "synchronous_reader" modifier of enginefacade so that it
refers to the "writer" engine when set to True, thereby allowing
"synchronous" behavior with the writer. When set to False, this is
"asynchronous", so this should be associated with the async engines.
The flag had the reverse behavior previously.
Change-Id: Id7fea7562ba90eb710176d497af103303f230531
Closes-bug: #1746116
|
| |
| |
| |
| | |
Change-Id: I99ca600d4211ef27791465a23100e484a10c323d
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
optimize_db_test_loader is replaced by optimize_package_test_loader
in test_fixtures.py.So this function is deprecated for removal.
Change-Id: I12cdf846f1e23d74ae8a87bea33fbc8477974bfc
Closes-Bug:#1715572
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
Add the bandit security scanner to the pep8 job.
* convert assert statement to raise AssertionError
* skip B311,B105
Change-Id: I23b2732791f42adfa04bd64f02b25cbdb98aaf93
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
method get_connect_string is deprecated and will be removed
from oslo_db in a few releases.Please use the provisioning
system for dealing with URLs and database provisioning.
method is_backend_avail is deprecated and will be removed
from oslo_db in a few releases.Please use the provisioning
system to access databases based on backend availability.
Change-Id: Idc27d45e96aad7b28b4332b0d8ab8c10bca73e67
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In Python3, assertRegexpMatches & assertNotRegexpMatches
are deprecated in favor of assertRegex and assertNotRegex
Change-Id: I35fd27e9618dcc6e229267a9af215ca15a47db69
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
getargspec has been deprecated in py3 with plans to remove it in py3.6.
The recommendation is to move to inspect.signature, but the results
of that call are different than the existing one.
There is also getfullargspec available under py3 that was originally
deprecated, but for the sake of handling 2/3 code, it has been
un-deprecated. This call uses signature internally, but returns a mostly
compatible result with what getargspec did. This handles getargspec
deprecation by just using getfullargspec instead if it is available.
Change-Id: I32dd29bde99f9d59c2b0e14dd6782162963b43ae
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
As Retry on request is always enabled, so the kwarg retry_on_request is
deprecated for removal.
Change-Id: I9c918828ce9f7075a4e33a6fbadd9613c81fa2eb
Closes-Bug: #1714440
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The method for skipping a test in unittest is skipTest(). testtools also
provides skip(), but that is deprecated. This eliminates the deprecation
warnings by switching to the recommended skipTest().
Change-Id: I45da95958e6f65475beab0d7a3c6de6604fa82d7
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: Idace3cbe1ac3c454443d1c786054dc8ff0b0e8b5
Closes-Bug: #1714842
|
| |_|/ /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Adjust a test that attempts to verify that a CHECK constraint
has been dropped to use raw SQL, as the Boolean datatype
in SQLAlchemy 1.1 is coercing the target value of "10" to a "1"
in any case. Starting with SQLAlchemy 1.2, the Python-side
Boolean datatype will also raise an error.
Change-Id: I99ffce63f9646323d9e2e3079e52b4829d996ea6
|
|\ \ \ \ |
|
| | |_|/
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This method is useless in class BackendImpl.
So it is deprecated for removal.
Change-Id: I3c73acc6b02da731a73880146661b63e75657982
Closes-Bug:#1714778
|
|\ \ \ \ |
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The change b3869d04cff7071c1226758eb8b58fde9eba5b8d was fixing #1615938
only for some cases, where the unicity of the row was done by one
column.
This change fixes it for other cases.
Change-Id: I4acb382c770b168f29fa35f02707fb22d402b13b
Closes-bug: #1615938
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Adds two new functions:
- get_foreign_key_constraint_name() - common function
used in subprojects which retrieves the name of a
foreign key constraint given table name / column name
- suspend_fk_constraints_for_col_alter() - given table name and column
name, locates matching foreign key constraints, drops them,
yields context, then recreates them as they were.
By default only runs for NDB thus avoiding expensive
constraint regeneration on other backends.
Co-authored-by: Mike Bayer <mike_mp@zzzcomputing.com>
Co-authored-by: Paul Bourke <paul.bourke@oracle.com>
Change-Id: I76c0d82fddf38add0ca05be270264b6e2d043f7f
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Stop throwing the deprecated DbMigrationError exception,
Use the new DBMigrationError exception instead,
so that the consumers can catch the new exception.
DbMigrationError will not be removed until no consumers
still use it.
Change-Id: Iab0566cf9f4552e91fa417e64472fa106e8bc86d
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| |
| |
| |
| | |
This patch is proposed according to the Direction 10 of doc
migration(https://etherpad.openstack.org/p/doc-migration-tracking).
Change-Id: I6904da7a5f2bd12cf44d047e4b865389e44fb56b
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
Remove AutoString* in ndb.py including
AutoStringTinyText,AutoStringText,AutoStringSize.
Change-Id: I707d69facb8f4542550243c1b5eff051264f3204
Closes-Bug:#1714913
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| | |
This method is useless in class Backend.
So this method is deprecated for removal.
Change-Id: I4f2aa180e5506172776ffc6f5e2a0111dacc5594
Closes-Bug:#1714776
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
This class in new edition is useless.
So class TransactionResource is
deprecated for removal.
Change-Id: Ie4155736732a04238f8458aec9ae0d9a0f709ad2
Closes-Bug:#1714765
|
|/
|
|
|
|
|
|
|
| |
This class in new edtion is useless.
So class InsertFromSelect is
deprecated for removal.
Change-Id: I200486a5a88e78b5223b9364fbea5901048d5cb9
Closes-Bug:#1714768
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
1.As mentioned in [1], we should avoid using six.iteritems to achieve iterators.
We can use dict.items instead, as it will return iterators in PY3 as well.
And dict.items/keys will more readable.
2.In py2, the performance about list should be negligible, see the link [2].
[1] https://wiki.openstack.org/wiki/Python3
[2] http://lists.openstack.org/pipermail/openstack-dev/2015-June/066391.html
Change-Id: If76115f706e9e100a1780471af0f9c5d92d3bc9f
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The "idle_timeout" name and documentation are misleading to users.
Rename the option to connection_recycle_time to more closely
match that of the underlying SQLAlchemy argument name
"pool_recycle", which refers to a time period for which
a connection present in the pool for longer than that number
of seconds will be closed and replaced with a new one *upon checkout*,
to prevent usage of stale connections that may have been closed by
server-side reapers.
Change-Id: I5e39d5ac81eaa8d85b1dfb18862fe27695ab8b96
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
The ndb change that makes use of String.adapt() to produce a new
object breaks on SQLAlchemy < 1.1 because adapt() there does
not allow for kwargs to override those already
present in the type.
Change-Id: I8cc79dc9bebcb3cb3accf76559bc969c2dae7ed9
|
|\ \ |
|