Gordon & Qiming, Thanks for your inputs. The only reason Zun was using 'id' is because the data model was copied from other projects and those projects are using 'id', but I couldn't think of a reason why they were using 'id' at the first place. By aggregating the feedback so far, I think it makes sense for Zun to switch to 'uuid' since we introduced etcd as an alternative datastore and etcd didn't support auto-increment primary key, unless someone pointed out a valid reason for stay using 'id'...
Best regards, Hongbin > -----Original Message----- > From: gordon chung [mailto:g...@live.ca] > Sent: February-21-17 8:29 AM > To: openstack-dev@lists.openstack.org > Subject: Re: [openstack-dev] [Zun]Use 'uuid' instead of 'id' as object > ident in data model > > > > 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 > > _______________________________________________________________________ > ___ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: OpenStack-dev- > requ...@lists.openstack.org?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev __________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev