<div dir="ltr">Joe, <div><br></div><div>Fully agree. We should just make a blueprint "Get rid of soft deletion". So we will get much better performance of DB + cleaner code, and avoid such things like shadow tables and DB purge scripts. </div>
<div><br></div><div>Probably we should some other thread to cover this topic? </div><div><br></div><div><br></div><div>Best regards,</div><div>Boris Pavlovic </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Mar 10, 2014 at 10:57 PM, Joe Gordon <span dir="ltr"><<a href="mailto:joe.gordon0@gmail.com" target="_blank">joe.gordon0@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Mon, Mar 10, 2014 at 7:11 AM, Matt Riedemann<br>
<<a href="mailto:mriedem@linux.vnet.ibm.com">mriedem@linux.vnet.ibm.com</a>> wrote:<br>
><br>
><br>
> On 3/9/2014 9:18 PM, Jay Pipes wrote:<br>
>><br>
>> On Mon, 2014-03-10 at 10:05 +0800, ChangBo Guo wrote:<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> 2014-03-10 4:47 GMT+08:00 Jay Pipes <<a href="mailto:jaypipes@gmail.com">jaypipes@gmail.com</a>>:<br>
>>><br>
>>><br>
>>>          > 3. This would make the instances and shadow_instances tables<br>
>>>          have<br>
>>>          > different schemas, i.e. instances.uuid would be<br>
>>>          nullable=False in<br>
>>>          > instances but nullable=True in shadow_instances.  Maybe this<br>
>>>          doesn't matter.<br>
>>><br>
>>><br>
>>>          No, I don't think this matters much, to be honest. I'm not<br>
>>>          entirely sure<br>
>>>          what the long-term purpose of the shadow tables are in Nova --<br>
>>>          perhaps<br>
>>>          someone could clue me in to whether the plan is to keep them<br>
>>>          around?<br>
>>><br>
>>><br>
>>> As I know the tables shadow_*  are used  by command ' nova-manage db<br>
>>> archive_deleted_rows' , which moves  records with "deleted=True" to<br>
>>> table shadow_* . That means these tables are used by other  process,<br>
>>> So, I think we need other tables to store the old records in your<br>
>>> migration.<br>
>><br>
>><br>
>> Yeah, that's what I understood the shadow tables were used for, I just<br>
>> didn't know what the long-term future of these tables was... curious if<br>
>> there's been any discussion about that.<br>
>><br>
>> Best,<br>
>> -jay<br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> OpenStack-dev mailing list<br>
>> <a href="mailto:OpenStack-dev@lists.openstack.org">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>
><br>
> I think Joe Gordon was working on something in the hopes of eventually<br>
> killing the shadow tables but I can't remember exactly what that was now.<br>
<br>
</div></div>I haven't been working on this but I do have a plan.<br>
<br>
Originally we couldn't hard delete anything in nova DB, because people<br>
wanted to keep the records around for well record keeping. The long<br>
term solution is make nova support (although not default to) hard<br>
delete. This means we need another place to store these records<br>
(ceilometer). Until then, we have shadow tables as a short term<br>
solution. If you want to keep records around but don't want them in<br>
your main nova DB.<br>
<br>
On a related note, nothing in nova should actually be using soft<br>
deleted data or shadow tables, any cases should be treated as bugs.<br>
<div class="im HOEnZb"><br>
<br>
<br>
><br>
> --<br>
><br>
> Thanks,<br>
><br>
> Matt Riedemann<br>
><br>
><br>
><br>
> _______________________________________________<br>
> OpenStack-dev mailing list<br>
> <a href="mailto:OpenStack-dev@lists.openstack.org">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>
</div><div class="HOEnZb"><div class="h5">_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">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>
</div></div></blockquote></div><br></div>