d060e8ae13
Some DBs' update method are order dependent, and they behave differently depending on the order of the values, example on a volume with 'available' status: UPDATE volumes SET previous_status=status, status='retyping' WHERE id='44f284f9-877d-4fce-9eb4-67a052410054'; Will result in a volume with 'retyping' status and 'available' previous_status both on SQLite and MariaDB, but UPDATE volumes SET status='retyping', previous_status=status WHERE id='44f284f9-877d-4fce-9eb4-67a052410054'; Will yield the same result in SQLite but will result in a volume with status and previous_status set to 'retyping' in MariaDB, which is not what we want, so order must be taken into consideration. This patch will allow conditional update to auto order the update including the possibility of accepting a spefic ordering that takes precedence over the automatic ordering. Automatic order is as follow: 1- Order specified in argument order 2- Values that refer to other ORM field (simple and using operations, like size + 10) 3- Values that use Case clause (since they may be using fields as well) 4- All other values Specs: https://review.openstack.org/232599/ Depends-On: I7de421252330fa27b0ad3cadbc4395a8f28a9dad Implements: blueprint cinder-volume-active-active-support Change-Id: Ic3a42a5bd2c7436328dc3bf449d463e170d9f807 |
||
---|---|---|
.. | ||
sqlalchemy | ||
__init__.py | ||
api.py | ||
base.py | ||
migration.py |