<div dir="ltr">I also agree to use 'uuid' as primary key as that makes more sense as compared to id. </div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 21, 2017 at 9:40 PM, Hongbin Lu <span dir="ltr"><<a href="mailto:hongbin.lu@huawei.com" target="_blank">hongbin.lu@huawei.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Gordon & Qiming,<br>
<br>
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'...<br>
<br>
Best regards,<br>
Hongbin<br>
<div class="HOEnZb"><div class="h5"><br>
> -----Original Message-----<br>
> From: gordon chung [mailto:<a href="mailto:gord@live.ca">gord@live.ca</a>]<br>
> Sent: February-21-17 8:29 AM<br>
> To: <a href="mailto:openstack-dev@lists.openstack.org">openstack-dev@lists.openstack.<wbr>org</a><br>
> Subject: Re: [openstack-dev] [Zun]Use 'uuid' instead of 'id' as object<br>
> ident in data model<br>
><br>
><br>
><br>
> On 21/02/17 01:28 AM, Qiming Teng wrote:<br>
> >> in mysql[2].<br>
> > Can someone remind me the benefits we get from Integer over UUID as<br>
> > primary key? UUID, as its name implies, is meant to be an identifier<br>
> > for a resource. Why are we generating integer key values?<br>
><br>
> this ^. use UUID please. you can google why auto increment is a<br>
> probably not a good idea.<br>
><br>
> from a selfish pov, as gnocchi captures data on all resources in<br>
> openstack, we store everything as a uuid anyways. even if your id<br>
> doesn't clash in zun, it has a higher chance of clashing when you<br>
> consider all the other resources from other services.<br>
><br>
> cheers,<br>
> --<br>
> gord<br>
><br>
> ______________________________<wbr>______________________________<wbr>___________<br>
> ___<br>
> OpenStack Development Mailing List (not for usage questions)<br>
> Unsubscribe: OpenStack-dev-<br>
> <a href="http://request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">request@lists.openstack.org?<wbr>subject:unsubscribe</a><br>
> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
<br>
______________________________<wbr>______________________________<wbr>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" target="_blank">OpenStack-dev-request@lists.<wbr>openstack.org?subject:<wbr>unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank">http://lists.openstack.org/<wbr>cgi-bin/mailman/listinfo/<wbr>openstack-dev</a><br>
</div></div></blockquote></div><br></div>