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

Pradeep Singh ps4openstack at gmail.com
Tue Feb 21 16:34:48 UTC 2017


I also agree to use 'uuid' as primary key as that makes more sense as
compared to id.

On Tue, Feb 21, 2017 at 9:40 PM, Hongbin Lu <hongbin.lu at huawei.com> wrote:

> 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:gord at live.ca]
> > Sent: February-21-17 8:29 AM
> > To: openstack-dev at 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-
> > request at 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-request at lists.openstack.org?subject:unsubscribe
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20170221/9db26e2d/attachment.html>


More information about the OpenStack-dev mailing list