<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 13, 2014 at 12:42 PM, Boris Pavlovic <span dir="ltr"><<a href="mailto:bpavlovic@mirantis.com" target="_blank">bpavlovic@mirantis.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Hi stackers, </div><div><br></div><div>
As a result of discussion:</div><div>[openstack-dev] [all][db][performance] Proposal: Get rid of soft deletion (step by step) </div>
<div><a href="http://osdir.com/ml/openstack-dev/2014-03/msg00947.html" target="_blank">http://osdir.com/ml/openstack-dev/2014-03/msg00947.html</a><br>
</div><div><br></div><div>I understood that there should be another proposal. About how we should implement Restorable & Delayed Deletion of OpenStack Resource in common way & without these hacks with soft deletion in DB.  It is actually very simple, take a look at this document: </div>


<div><br></div><a href="https://docs.google.com/document/d/1WGrIgMtWJqPDyT6PkPeZhNpej2Q9Mwimula8S8lYGV4/edit?usp=sharing" target="_blank">https://docs.google.com/document/d/1WGrIgMtWJqPDyT6PkPeZhNpej2Q9Mwimula8S8lYGV4/edit?usp=sharing</a><br>


<div><br></div><div><br></div><div>Best regards,</div><div>Boris Pavlovic </div></div>
<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote><div><br></div><div><br></div><div>Hi Boris,</div><div><br></div><div>Before I voice a little disagreement, I'd like to thank you for kicking off this discussion and stress that I strongly agree with your view (pulled from the other thread)</div>
<div><br></div><div>> <span style="font-family:arial,sans-serif;font-size:13px">To put in a nutshell: Restoring Delete resources / Delayed Deletion != Soft deletion. </span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="font-family:arial,sans-serif;font-size:13px">This is absolutely correct and the key to unlocking the problem we have.</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><font face="arial, sans-serif">However, because of migrations and because being explicit is better than being implicit, I disagree about the idea of lumping deleted resources all into the same table. For glance, I'd much rather have a table "deleted_images" than a table "deleted_resources" that has some image entries. There are a number of reasons, I'll try to give a quick high-level view of them.</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">1) Migrations for deleted data are more straightforward and more obviously necessary.</font></div><div><font face="arial, sans-serif">2) It is possible to make specific modifications to the "deleted_X" schema.</font></div>
<div><font face="arial, sans-serif">3) It is possible to take many tables that are used to represent a single active resource (images, image_locations, image_tags, image_properties) and combine them into a single table for a deleted resource. This is actually super important as today we have the problem of not always knowing what image_properties were actually deleted prior to the image deletion vs the ones that were deleted as a part of the image deletion.</font></div>
<div><font face="arial, sans-serif">4) It makes it a conscious choice to decide to have certain types of resources restorable or have delayed deletes. As you said before, many types of resources just don't need this functionality, so let's not make it a feature of the common base class.</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">(I am assuming for #2 and #3 that this common approach would be implemented something like "deleted_resource['data'] = json.dumps(dict(active_resource))", sorry if that is seriously incorrect.)</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Thanks for your consideration,</font></div><div><font face="arial, sans-serif">markwash</font></div>
<div><br></div><div> </div></div><br></div></div>