Michał Dulko
8b3ca76b98
Fix race conditions in migration 061
Migration 061 is supposed to add new `data_timestamp` field and populate it with value of `created_at` column. This was done by selecting all the backups and doing updates one-by-one. As it wasn't done in transaction solution was prone to race condition when a new backup is added while running the migration. This means that this migration could cause problems when running in live environment. With blueprint online-schema-upgrades we want to make Cinder able to perform migrations live. A solution is to change this statement to a single DB query which updates all the rows. This commit also removes unnecessary update to snapshot_id added there. As this column is nullable it will by default be NULL, so there's no need to set it manually to that value. As before and after this commit the migration does logically the same, this should be safe even if someone is doing inter-release deployments. An alternative would be to simply add transaction to the update step in the migration, but that would effectively lock the table for longer period of time than atomic one-query update. Closes-Bug: 1530358 Change-Id: Ib8733c096a3dbe2bad00beaf5734936ffcddda33
CINDER
You have come across a storage service for an open cloud computing service. It has identified itself as Cinder. It was abstracted from the Nova project.
- Wiki: http://wiki.openstack.org/Cinder
- Developer docs: http://docs.openstack.org/developer/cinder
Getting Started
If you'd like to run from the master branch, you can clone the git repo:
git clone https://github.com/openstack/cinder.git
For developer information please see HACKING.rst
You can raise bugs here http://bugs.launchpad.net/cinder
Python client
Description
Languages
Python
99.7%
Smarty
0.3%