[openstack-dev] [Zun]Use 'uuid' instead of 'id' as object ident in data model

gordon chung gord at live.ca
Tue Feb 21 13:28:54 UTC 2017



On 21/02/17 01:28 AM, Qiming Teng wrote:
>> in mysql[2].
> Can someone remind me the benefits we get from Integer over UUID as
> primary key? UUID, as its name implies, is meant to be an identifier for
> a resource. Why are we generating integer key values?

this ^. use UUID please. you can google why auto increment is a probably 
not a good idea.

from a selfish pov, as gnocchi captures data on all resources in 
openstack, we store everything as a uuid anyways. even if your id 
doesn't clash in zun, it has a higher chance of clashing when you 
consider all the other resources from other services.

cheers,
-- 
gord



More information about the OpenStack-dev mailing list