[openstack-dev] Does DB schema hygiene warrant long migrations?

Chris Behrens cbehrens at codestud.com
Thu Oct 24 21:04:07 UTC 2013


On Oct 24, 2013, at 1:33 PM, Robert Collins <robertc at robertcollins.net> wrote:

> -2 to 10 minute downtimes.
> 
> +1 to doing the evolution gracefully. There is a spec for doing that
> from the H summit; someone just needs to implement it.

+1.  IMO, we need to move to a model where code can understand multiple schemas and migrate to newer schema on the fly.  The object code in nova will be able to help us do this.  Combine this with some sort of background task if you need to speed up the conversion.  Any migrations that need to run through all of the data in a table during downtime is just not going to scale.

I am personally tired of having to deal with DB migrations having to run for 1 hour during upgrades that happened numerous times throughout the Havana development cycle.

- Chris

> 
> -Rob
> 
> On 25 October 2013 09:30, Michael Still <mikal at stillhq.com> wrote:
>> Hi.
>> 
>> Because I am a grumpy old man I have just -2'ed
>> https://review.openstack.org/#/c/39685/ and I wanted to explain my
>> rationale. Mostly I am hoping for a consensus to form -- if I am wrong
>> then I'll happy remove my vote from this patch.
>> 
>> This patch does the reasonably sensible thing of converting two
>> columns from being text to varchar, which reduces their expense to the
>> database. Given the data stored is already of limited length, it
>> doesn't impact our functionality at all either.
>> 
>> However, when I run it with medium sized (30 million instances)
>> databases, the change does cause a 10 minute downtime. I don't
>> personally think the change is worth such a large outage, but perhaps
>> everyone else disagrees.
>> 
>> Discuss.
>> 
>> Thanks,
>> Michael
>> 
>> PS: I could see a more complicated approach where we did these changes
>> "in flight" by adding columns, using a periodic task to copy data to
>> the new columns, and then dropping the old. That's a lot more
>> complicated to implement though.
>> 
>> --
>> Rackspace Australia
>> 
>> _______________________________________________
>> OpenStack-dev mailing list
>> OpenStack-dev at lists.openstack.org
>> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 
> 
> 
> -- 
> Robert Collins <rbtcollins at hp.com>
> Distinguished Technologist
> HP Converged Cloud
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev




More information about the OpenStack-dev mailing list