<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi team,</div><div class=""><br class=""></div><div class="">I need your advice on this patch[1], which aims to implement etcd DB data model and API</div><div class="">for 'ResourceClass' object.</div><div class=""><br class=""></div><div class="">As you may know, in mysql implementation, mysql will generate a 'id' field, which is an</div><div class="">unique and auto increase integer. The 'id' is also used as 'primary key' or 'foreign key'</div><div class="">in mysql[2].</div><div class=""><br class=""></div><div class="">However, in etcd implementation, etcd will NOT generate this 'id' itself, so I intend to</div><div class="">use the 'uuid' attribute of the object instead of 'id', and modify the DB API method to use</div><div class="">'uuid' as object ident instead of 'id', like[3]. Personally I feel using 'uuid' is more</div><div class="">reasonable because 'id' is a specific field in DB like mysql, seems it does not have actual</div><div class="">meaning in data model, right?</div><div class=""><br class=""></div><div class="">An alternative way Hongbin suggested is to generate an unique 'id' like mysql by ourselves</div><div class="">and insert the 'id' into etcd data model. But he said he's OK with the idea to replace 'id'</div><div class="">with 'uuid' if it does not break anything.</div><div class=""><br class=""></div><div class="">What's your opinion on this issue? Thanks in advance!</div><div class=""><br class=""></div><div class="">[1]<a href="https://review.openstack.org/#/c/434909/" class="">https://review.openstack.org/#/c/434909/</a></div><div class="">[2]<a href="https://github.com/openstack/zun/blob/c0cebba170b8e3ea5e62e335536cf974bbbf08ec/zun/db/sqlalchemy/models.py#L200" class="">https://github.com/openstack/zun/blob/c0cebba170b8e3ea5e62e335536cf974bbbf08ec/zun/db/sqlalchemy/models.py#L200</a></div><div class="">[3]<a href="https://github.com/openstack/zun/blob/c0cebba170b8e3ea5e62e335536cf974bbbf08ec/zun/db/etcd/api.py#L209" class="">https://github.com/openstack/zun/blob/c0cebba170b8e3ea5e62e335536cf974bbbf08ec/zun/db/etcd/api.py#L209</a></div><div class=""><br class=""></div><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Best Regards,</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">Wenzhi Yu (yuywz)</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<br class=""></div></div></body></html>